Systems and methods of clustered sharing of compression histories

ABSTRACT

Systems and methods of storing previously transmitted data and using it to reduce bandwidth usage and accelerate future communications are described. By using algorithms to identify long compression history matches, a network device may improve compression efficiently and speed. A network device may also use application specific parsing to improve the length and number of compression history matches. Further, by sharing compression histories, compression history indexes and caches across multiple devices, devices can utilize data previously transmitted to other devices to compress network traffic. Any combination of the systems and methods may be used to efficiently find long matches to stored data, synchronize the storage of previously sent data, and share previously sent data among one or more other devices.

FIELD OF THE INVENTION

The present invention generally relates to data communication networks.In particular, the present invention relates to systems and methods forcompressing data streams and improving network performance by leveragingpreviously stored data.

BACKGROUND OF THE INVENTION

Compressing data streams by utilizing previously stored data is a knowntechnique for reducing the size of data streams transmitted between twodevices. In broad terms, a typical compression method entails twodevices each storing copies of data that is sent between the devices.These stored copies of the data can be referred to as compressionhistories, as they represent a history of previously transmitted datathat is then used to compress future data streams. When one of thedevices is transmitting data to the other device, it searches itscompression history for matches to the input data, and replaces thematched portions with references to the stored data in the transmissionstream, reducing the size of the transmitted stream. The receivingdevice then uses the references in combination with its own compressionhistory to reconstruct the uncompressed data stream. However, thisgeneral technique presents a number of challenges.

First, insufficiently long matches between input streams and compressionhistories can result in poor compression ratios, as well as increasingthe processing overhead and number of times that a compression historymust be accessed. These problems can be exacerbated in cases where adevice is transmitting multiple data streams simultaneously, and thusmay have several processes attempting to access a compression historysimultaneously. These problems also may be accentuated in devices usinga compression history stored on a medium, such as a disk, with longpotential access latencies. To give a concrete example, a device sendinga 2K file may find forty matching references scattered across itscompression history, each reference matching a different 50 bytes of thefile. This may require 40 separate iterations of a potentially complexmatching algorithm, and 40 separate disk accesses to a compressionhistory. By contrast, if a device finds a single matching reference forthe entire 2K file, only a single disk access may be needed. Thus thereis a need for systems and methods for efficiently creating locating longmatches between an input stream and a compression history.

Second, when one device has sequences in its compression history thatare not in a corresponding compression history on another device,inefficiencies may result. The device may replace portions of datastreams with references to the sequences, and then be forced toretransmit the data stream as it discovers the other device does nothave the referenced sequences. Further, the unshared sequences mayoccupy space in a compression history that could be used for other data.A number of methods may be used to synchronize compression historieswith respect to data currently being transmitted between two devices.For example, each device may transmit information corresponding to thetotal number of bytes transmitted, received, and stored, as well aslocation identifiers identifying where the data has been stored.However, even if the compression histories are synchronized immediatelyfollowing transmission of data, a number of events may cause thecompression histories to subsequently diverge. For example, one devicemay run out of storage and be forced to overwrite one or more previouslystored portions. Or one device may have a disk error or other hardwareor software glitch which corrupts or removes one or more previouslystored portions. Thus, there exists a need for improved systems andmethods for efficiently synchronizing shared compression histories.

Third, in many implementations, compression histories and caching onlyprovide benefits if the same data is repeatedly sent between the sametwo devices. This can be especially problematic in situations where twosites, each having a cluster of devices, may repeatedly communicatesimilar information, but there is no guarantee the information will passthrough the same pair of devices. For example, two sites may eachmaintain a cluster of devices to accelerate communications between thesites. Cluster 1 may contain the devices A, B, and C, and cluster 2 maycontain the devices X, Y, and Z. For example, devices A and Z may eachmaintain a compression history of a file sent between A and Z, but thenext time the file is requested the request and response may passthrough devices A and Y. Similarly, the next time the file is requestedthe request and response may pass through device B and device X. Onepotential solution is to organize the device clusters in a hierarchy sothat all requests to a given cluster, network, or region pass through agateway device. However, this solution may involve additionalconfiguration and create network bottlenecks. Thus there exists a needfor leveraging data previously transmitted between two devices tocompress data streams transmitted between devices other than theoriginal transmitters, without necessarily requiring explicithierarchies.

BRIEF SUMMARY OF THE INVENTION

The present invention is directed towards systems and methods of storingpreviously transmitted data and using it to reduce bandwidth usage andaccelerate future communications. By using algorithms to identify longcompression history matches, a network device may improve compressionefficiently and speed. A network device may also use applicationspecific parsing to improve the length and number of compression historymatches. Further, by sharing compression histories, compression historyindexes, and caches across multiple devices, devices can utilize datapreviously transmitted to other devices to compress network traffic. Anycombination of the systems and methods described in the followingparagraphs may be used to efficiently find long matches to stored data,synchronize the storage of previously sent data, and share previouslysent data among one or more other devices.

In a first aspect, the present invention relates to systems and methodsfor determining whether to perform disk based compression by identifyingin an index maintained in memory an estimated extent of a match of inputdata to contiguous data stored on disk is above or below a predeterminedthreshold. In one embodiment, a device having a compression historyestablishes an index in memory that corresponds fingerprints of aplurality of portions of data of the compression history to locationidentifiers identifying locations on disk having the plurality ofportions of data. The device identifies a number of fingerprints ofinput data match fingerprints of a plurality of entries of the index inmemory, and determines, from the number of identified fingerprints inmemory having entries corresponding to a first location identifier thatan estimated match of input data to contiguous data on disk isextendable below a predetermined threshold. If the match is extendablebelow a given threshold, the device transmits the data uncompressed. Ifthe match is extendable above the given threshold, the device uses thecompression history to compress the data.

In a second aspect, the present invention relates to systems and methodsfor determining a precedence for matching fingerprints of input data toan index of fingerprints identifying a plurality of instances of data ina compression history. In one embodiment, a device having a compressionhistory establishing an index that corresponds fingerprints of aplurality of portions of data of the compression history to locationidentifiers identifying locations on disk having the plurality ofportions of data. The device identifies that a plurality of fingerprintsof input data match a plurality of entries in the index having at leastone location identifier and selects an entry of the plurality of entrieshaving a fewest number of location identifiers. The device may thenmatch a first portion of the input data to data in a first location inthe compression history identified by the selected entry.

In a third aspect, the present invention relates to systems and methodsfor a method for improving compression history matches by removingapplication layer protocol headers from compression history data. In oneembodiment, these systems and method include transmitting, between afirst device and a second device, an application data stream, theapplication data stream comprising at least one application layerprotocol header between a first sequence of application data and asecond sequence of application data. The first device identifies thefirst sequence and the second sequence from the application data streamand stores a combined sequence comprising the first sequence and thethird sequence to a compression history.

In a fourth aspect, the present invention relates to systems and methodsfor synchronizing compression histories shared between two devices. Inone embodiment, a first device stores a first compression history, thecompression history comprising a plurality of portions of datapreviously transmitted to a second device, each portion of data having alocation identifier. The first device may then create an ordered list oflocation identifiers ordered by a time the first device last accessed aportion of data in a location corresponding to each identifier. Thefirst device receives, from the second device, information identifying aquantity of location identifiers of a corresponding second compressionhistory on the second device; and determines the received quantity isless than a quantity of location identifiers of the first compressionhistory by a first amount. The first device may then select forobsolescence, from the list of location identifiers, the first amount oflocation identifiers at an end of the ordered list corresponding toleast recently accessed portions of data.

In a fifth aspect, the present invention relates to systems and methodsfor sharing compression histories among a plurality of devices toimprove compression of data transmitted via a plurality of connections.In one embodiment, a first device transmits, to a second device, a firstdata stream, the first data stream compressed according to a firstcompression history shared between the first device and the seconddevice. The first device may receive, from the third device, anindication that a third device is located on the same network as thesecond device. The first device receives a second data stream intendedfor the third device. The first device identifies that a portion of thedata stream matches within a predetermined threshold a portion of thefirst compression history, and transmits, to the third device,information identifying the portion of the first compression history.This may allow communications between the first and third device to becompressed according to a compression history originally shared betweenthe first and second devices.

Another embodiment of the fifth aspect includes transmitting, between afirst device and a second device, a first data stream, the first datastream compressed according to a first compression history sharedbetween the first device and the second device. The first devicereceives information identifying a third device and a portion of thefirst compression history and transmits, to the third device, theidentified portion of the first compression history.

Still another embodiment includes a first device receiving, by a firstdevice from a second device, a data stream, the data stream compressedaccording to a compression history shared between the first device and athird device. The first device identifies the third device andtransmits, to the third device, a request for a portion of thecompression history. The first device receives, from the third device,the requested portion of the compression history. The first device maythen decompress the data stream and transmit the decompressed stream tothe client.

A sixth aspect of the present invention relates to systems and methodsfor sharing compression indexes among one or more clusters of devices toimprove compression of data transmitted via a plurality of connections.One embodiment includes receiving, by a first device from a seconddevice, an index of entries for a compression history shared between thesecond device and a third device; each index entry comprising a locationidentifier of data stored in the second device. The first devicereceives a data stream intended for a fourth device; and identifies thata portion of the data stream matches an entry of the received index. Thefirst device transmits, to the second device, a location identifiercorresponding to the matched entry. The first device receives, from thesecond device, a portion of the compression history corresponding to thelocation identifier; and determines the portion of the compressionhistory matches a portion of the data stream. The first device may thentransmit, to the fourth device, information identifying the portion ofthe compression history. This allows communications between the thirdand fourth device to be compressed according to the compression historyoriginally shared between the first and second devices.

A seventh aspect of the present invention relates to systems and methodsfor providing an ad-hoc hierarchy of caches to serve objects. In oneembodiment, a first appliance receives from a client, a first requestfor an object from a server. The first device identifies that the objectis not located in a first cache of the appliance and forward the firstrequest for the object to the serve. The appliance transmits, prior toreceiving a response to the forwarded request, a second request for theobject to a second device. The appliance receives, from at least one ofthe server or the second device, the object; and then transmits theobject to the client.

The details of various embodiments of the invention are set forth in theaccompanying drawings and the description below.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing and other objects, aspects, features, and advantages ofthe invention will become more apparent and better understood byreferring to the following description taken in conjunction with theaccompanying drawings, in which:

FIG. 1A is a block diagram of an embodiment of a network environment fora client to access a server via one or more network optimizationappliances;

FIG. 1B is a block diagram of another embodiment of a networkenvironment for a client to access a server via one or more networkoptimization appliances in conjunction with other network appliances;

FIG. 1C is a block diagram of another embodiment of a networkenvironment for a client to access a server via a single networkoptimization appliance deployed stand-alone or in conjunction with othernetwork appliances;

FIGS. 1D and 1E are block diagrams of embodiments of a computing device;

FIG. 2A is a block diagram of an embodiment of an appliance forprocessing communications between a client and a server;

FIG. 2B is a block diagram of another embodiment of a client and/orserver deploying the network optimization features of the appliance;

FIG. 3 is a block diagram of an embodiment of a client for communicatingwith a server using the network optimization feature;

FIG. 4A is a block diagram of an embodiment of using a sharedcompression history to reduce the size of transmitted data;

FIG. 4B is a block diagram of one embodiment of a data structure used tostore data in a compression history;

FIG. 4C is a block diagram of one embodiment of a data structure whichcan be used to locate data portions in a compression history;

FIG. 5A is a block diagram illustrating one embodiment of using acompression index to locate compression history matches corresponding toinput data;

FIG. 5B is a flow diagram of one embodiment of a method for determiningwhether to perform disk based compression by identifying in an indexmaintained in memory an estimated extent of a match of input data tocontiguous data stored on disk is above or below a predeterminedthreshold;

FIG. 6A is a block diagram illustrating a second embodiment of using acompression index to locate compression history matches corresponding toinput data;

FIG. 6B is a flow diagram of one embodiment of a method for determininga precedence for matching fingerprints of input data to an index offingerprints identifying a plurality of instances of data in acompression history;

FIG. 7A is a block diagram illustrating one embodiment of removingapplication layer protocol headers from data stored in a compressionhistory;

FIG. 7B is a block diagram illustrating a second embodiment of atechnique for removing application layer protocol headers and from datastored in a compression history;

FIG. 7C is a flow diagram of one embodiment of a method for improvingcompression history matches by removing application layer protocolheaders from compression history data;

FIG. 7D is a flow diagram of one embodiment of a method for improvingcompression history matches by removing application layer protocolheaders from received data;

FIG. 8A is a block diagram of one embodiment of a system forsynchronizing compression histories shared between two devices;

FIG. 8B is a flow diagram of a method for synchronizing compressionhistories shared between two devices;

FIG. 9A is a block diagram illustrating one embodiment of sharingcompression histories among a plurality of devices;

FIG. 9B is a flow diagram of one embodiment of a method for sharingcompression histories among a plurality of devices to improvecompression of data transmitted via a plurality of connections;

FIG. 9C is a flow diagram of a second embodiment of a method for sharingcompression histories among a plurality of devices to improvecompression of data transmitted via a plurality of connections;

FIG. 9D is a flow diagram of a third embodiment of a method for sharingcompression histories among a plurality of devices to improvecompression of data transmitted via a plurality of connections;

FIG. 10A is a block diagram illustrating one embodiment of a system forsharing compression history indexes to accelerate data transmissionbetween two groups of devices;

FIG. 10B is a flow diagram of a method for sharing compression indexesamong a plurality of devices to improve compression of data transmittedvia a plurality of connections;

FIG. 11A is a block diagram illustrating one embodiment of providing anad-hoc hierarchy of caches to serve objects; and

FIG. 11B is a flow diagram illustrating one embodiment of a method forproviding an ad-hoc hierarchy of caches to serve objects.

The features and advantages of the present invention will become moreapparent from the detailed description set forth below when taken inconjunction with the drawings, in which like reference charactersidentify corresponding elements throughout. In the drawings, likereference numbers generally indicate identical, functionally similar,and/or structurally similar elements.

DETAILED DESCRIPTION OF THE INVENTION

For purposes of reading the description of the various embodiments ofthe present invention below, the following descriptions of the sectionsof the specification and their respective contents may be helpful:

-   -   Section A describes a network environment and computing        environment useful for practicing an embodiment of the present        invention;    -   Section B describes embodiments of a system and appliance        architecture for accelerating delivery of a computing        environment to a remote user;    -   Section C describes embodiments of a client agent for        accelerating communications between a client and a server;    -   Section D describes embodiments of systems and methods for using        a compression history;    -   Section E describes embodiments of systems and methods for        efficiently identifying compression history matches;    -   Section F describes embodiments of systems and methods for        removing application layer headers from compression history        data;    -   Section G describes embodiments of systems and methods for        synchronizing expiration of shared compression history data; and    -   Section H describes embodiments of systems and methods for        leveraging shared compression histories across more than two        devices.    -   Section I describes embodiments of systems and methods for        ad-hoc cache hierarchies.        A. Network and Computing Environment

Prior to discussing the specifics of embodiments of the systems andmethods of an appliance and/or client, it may be helpful to discuss thenetwork and computing environments in which such embodiments may bedeployed. Referring now to FIG. 1A, an embodiment of a networkenvironment is depicted. In brief overview, the network environment hasone or more clients 102 a-102 n (also generally referred to as localmachine(s) 102, or client(s) 102) in communication with one or moreservers 106 a-106 n (also generally referred to as server(s) 106, orremote machine(s) 106) via one or more networks 104, 104′, 104″. In someembodiments, a client 102 communicates with a server 106 via one or morenetwork optimization appliances 200, 200′ (generally referred to asappliance 200). In one embodiment, the network optimization appliance200 is designed, configured or adapted to optimize Wide Area Network(WAN) network traffic. In some embodiments, a first appliance 200 worksin conjunction or cooperation with a second appliance 200′ to optimizenetwork traffic. For example, a first appliance 200 may be locatedbetween a branch office and a WAN connection while the second appliance200′ is located between the WAN and a corporate Local Area Network(LAN). The appliances 200 and 200′ may work together to optimize the WANrelated network traffic between a client in the branch office and aserver on the corporate LAN.

Although FIG. 1A shows a network 104, network 104′ and network 104″(generally referred to as network(s) 104) between the clients 102 andthe servers 106, the clients 102 and the servers 106 may be on the samenetwork 104. The networks 104, 104′, 104″ can be the same type ofnetwork or different types of networks. The network 104 can be alocal-area network (LAN), such as a company Intranet, a metropolitanarea network (MAN), or a wide area network (WAN), such as the Internetor the World Wide Web. The networks 104, 104′, 104″ can be a private orpublic network. In one embodiment, network 104′ or network 104″ may be aprivate network and network 104 may be a public network. In someembodiments, network 104 may be a private network and network 104′and/or network 104″ a public network. In another embodiment, networks104, 104′, 104″ may be private networks. In some embodiments, clients102 may be located at a branch office of a corporate enterprisecommunicating via a WAN connection over the network 104 to the servers106 located on a corporate LAN in a corporate data center.

The network 104 may be any type and/or form of network and may includeany of the following: a point to point network, a broadcast network, awide area network, a local area network, a telecommunications network, adata communication network, a computer network, an ATM (AsynchronousTransfer Mode) network, a SONET (Synchronous Optical Network) network, aSDH (Synchronous Digital Hierarchy) network, a wireless network and awireline network. In some embodiments, the network 104 may comprise awireless link, such as an infrared channel or satellite band. Thetopology of the network 104 may be a bus, star, or ring networktopology. The network 104 and network topology may be of any suchnetwork or network topology as known to those ordinarily skilled in theart capable of supporting the operations described herein.

As depicted in FIG. 1A, a first network optimization appliance 200 isshown between networks 104 and 104′ and a second network optimizationappliance 200′ is also between networks 104′ and 104″. In someembodiments, the appliance 200 may be located on network 104. Forexample, a corporate enterprise may deploy an appliance 200 at thebranch office. In other embodiments, the appliance 200 may be located onnetwork 104′. In some embodiments, the appliance 200′ may be located onnetwork 104′ or network 104″. For example, an appliance 200 may belocated at a corporate data center. In one embodiment, the appliance 200and 200′ are on the same network. In another embodiment, the appliance200 and 200′ are on different networks.

In one embodiment, the appliance 200 is a device for accelerating,optimizing or otherwise improving the performance, operation, or qualityof service of any type and form of network traffic. In some embodiments,the appliance 200 is a performance enhancing proxy. In otherembodiments, the appliance 200 is any type and form of WAN optimizationor acceleration device, sometimes also referred to as a WAN optimizationcontroller. In one embodiment, the appliance 200 is any of the productembodiments referred to as WANScaler manufactured by Citrix Systems,Inc. of Ft. Lauderdale, Fla. In other embodiments, the appliance 200includes any of the product embodiments referred to as BIG-IP linkcontroller and WANjet manufactured by F5 Networks, Inc. of Seattle,Wash. In another embodiment, the appliance 200 includes any of the WXand WXC WAN acceleration device platforms manufactured by JuniperNetworks, Inc. of Sunnyvale, Calif. In some embodiments, the appliance200 includes any of the steelhead line of WAN optimization appliancesmanufactured by Riverbed Technology of San Francisco, Calif. In otherembodiments, the appliance 200 includes any of the WAN related devicesmanufactured by Expand Networks Inc. of Roseland, N.J. In oneembodiment, the appliance 200 includes any of the WAN related appliancesmanufactured by Packeteer Inc. of Cupertino, Calif., such as thePacketShaper, iShared, and SkyX product embodiments provided byPacketeer. In yet another embodiment, the appliance 200 includes any WANrelated appliances and/or software manufactured by Cisco Systems, Inc.of San Jose, Calif., such as the Cisco Wide Area Network ApplicationServices software and network modules, and Wide Area Network engineappliances.

In some embodiments, the appliance 200 provides application and dataacceleration services for branch-office or remote offices. In oneembodiment, the appliance 200 includes optimization of Wide Area FileServices (WAFS). In another embodiment, the appliance 200 acceleratesthe delivery of files, such as via the Common Internet File System(CIFS) protocol. In other embodiments, the appliance 200 providescaching in memory and/or storage to accelerate delivery of applicationsand data. In one embodiment, the appliance 205 provides compression ofnetwork traffic at any level of the network stack or at any protocol ornetwork layer. In another embodiment, the appliance 200 providestransport layer protocol optimizations, flow control, performanceenhancements or modifications and/or management to accelerate deliveryof applications and data over a WAN connection. For example, in oneembodiment, the appliance 200 provides Transport Control Protocol (TCP)optimizations. In other embodiments, the appliance 200 providesoptimizations, flow control, performance enhancements or modificationsand/or management for any session or application layer protocol. Furtherdetails of the optimization techniques, operations and architecture ofthe appliance 200 are discussed below in Section B.

Still referring to FIG. 1A, the network environment may includemultiple, logically-grouped servers 106. In these embodiments, thelogical group of servers may be referred to as a server farm 38. In someof these embodiments, the servers 106 may be geographically dispersed.In some cases, a farm 38 may be administered as a single entity. Inother embodiments, the server farm 38 comprises a plurality of serverfarms 38. In one embodiment, the server farm executes one or moreapplications on behalf of one or more clients 102.

The servers 106 within each farm 38 can be heterogeneous. One or more ofthe servers 106 can operate according to one type of operating systemplatform (e.g., WINDOWS NT, manufactured by Microsoft Corp. of Redmond,Wash.), while one or more of the other servers 106 can operate onaccording to another type of operating system platform (e.g., Unix orLinux). The servers 106 of each farm 38 do not need to be physicallyproximate to another server 106 in the same farm 38. Thus, the group ofservers 106 logically grouped as a farm 38 may be interconnected using awide-area network (WAN) connection or metropolitan-area network (MAN)connection. For example, a farm 38 may include servers 106 physicallylocated in different continents or different regions of a continent,country, state, city, campus, or room. Data transmission speeds betweenservers 106 in the farm 38 can be increased if the servers 106 areconnected using a local-area network (LAN) connection or some form ofdirect connection.

Servers 106 may be file servers, application servers, web servers, proxyservers, and/or gateway servers. In some embodiments, a server 106 mayhave the capacity to function as either an application server or as amaster application server. In one embodiment, a server 106 may includean Active Directory. The clients 102 may also be referred to as clientnodes or endpoints. In some embodiments, a client 102 has the capacityto function as both a client node seeking access to applications on aserver and as an application server providing access to hostedapplications for other clients 102 a-102 n.

In some embodiments, a client 102 communicates with a server 106. In oneembodiment, the client 102 communicates directly with one of the servers106 in a farm 38.

In another embodiment, the client 102 executes a program neighborhoodapplication to communicate with a server 106 in a farm 38. In stillanother embodiment, the server 106 provides the functionality of amaster node. In some embodiments, the client 102 communicates with theserver 106 in the farm 38 through a network 104. Over the network 104,the client 102 can, for example, request execution of variousapplications hosted by the servers 106 a-106 n in the farm 38 andreceive output of the results of the application execution for display.In some embodiments, only the master node provides the functionalityrequired to identify and provide address information associated with aserver 106′ hosting a requested application.

In one embodiment, a server 106 provides functionality of a web server.In another embodiment, the server 106 a receives requests from theclient 102, forwards the requests to a second server 106 b and respondsto the request by the client 102 with a response to the request from theserver 106 b. In still another embodiment, the server 106 acquires anenumeration of applications available to the client 102 and addressinformation associated with a server 106 hosting an applicationidentified by the enumeration of applications. In yet anotherembodiment, the server 106 presents the response to the request to theclient 102 using a web interface. In one embodiment, the client 102communicates directly with the server 106 to access the identifiedapplication. In another embodiment, the client 102 receives applicationoutput data, such as display data, generated by an execution of theidentified application on the server 106.

Deployed with Other Appliances.

Referring now to FIG. 1B, another embodiment of a network environment isdepicted in which the network optimization appliance 200 is deployedwith one or more other appliances 205, 205′ (generally referred to asappliance 205 or second appliance 205) such as a gateway, firewall oracceleration appliance. For example, in one embodiment, the appliance205 is a firewall or security appliance while appliance 205′ is a LANacceleration device. In some embodiments, a client 102 may communicateto a server 106 via one or more of the first appliances 200 and one ormore second appliances 205.

One or more appliances 200 and 205 may be located at any point in thenetwork or network communications path between a client 102 and a server106. In some embodiments, a second appliance 205 may be located on thesame network 104 as the first appliance 200. In other embodiments, thesecond appliance 205 may be located on a different network 104 as thefirst appliance 200. In yet another embodiment, a first appliance 200and second appliance 205 is on the same network, for example network104, while the first appliance 200′ and second appliance 205′ is on thesame network, such as network 104″.

In one embodiment, the second appliance 205 includes any type and formof transport control protocol or transport later terminating device,such as a gateway or firewall device. In one embodiment, the appliance205 terminates the transport control protocol by establishing a firsttransport control protocol connection with the client and a secondtransport control connection with the second appliance or server. Inanother embodiment, the appliance 205 terminates the transport controlprotocol by changing, managing or controlling the behavior of thetransport control protocol connection between the client and the serveror second appliance. For example, the appliance 205 may change, queue,forward or transmit network packets in manner to effectively terminatethe transport control protocol connection or to act or simulate asterminating the connection.

In some embodiments, the second appliance 205 is a performance enhancingproxy. In one embodiment, the appliance 205 provides a virtual privatenetwork (VPN) connection. In some embodiments, the appliance 205provides a Secure Socket Layer VPN (SSL VPN) connection. In otherembodiments, the appliance 205 provides an IPsec (Internet ProtocolSecurity) based VPN connection. In some embodiments, the appliance 205provides any one or more of the following functionality: compression,acceleration, load-balancing, switching/routing, caching, and TransportControl Protocol (TCP) acceleration.

In one embodiment, the appliance 205 is any of the product embodimentsreferred to as Access Gateway, Application Firewall, ApplicationGateway, or NetScaler manufactured by Citrix Systems, Inc. of Ft.Lauderdale, Fla. As such, in some embodiments, the appliance 205includes any logic, functions, rules, or operations to perform servicesor functionality such as SSL VPN connectivity, SSL offloading,switching/load balancing, Domain Name Service resolution, LANacceleration and an application firewall.

In some embodiments, the appliance 205 provides a SSL VPN connectionbetween a client 102 and a server 106. For example, a client 102 on afirst network 104 requests to establish a connection to a server 106 ona second network 104′. In some embodiments, the second network 104″ isnot routable from the first network 104. In other embodiments, theclient 102 is on a public network 104 and the server 106 is on a privatenetwork 104′, such as a corporate network. In one embodiment, a clientagent intercepts communications of the client 102 on the first network104, encrypts the communications, and transmits the communications via afirst transport layer connection to the appliance 205. The appliance 205associates the first transport layer connection on the first network 104to a second transport layer connection to the server 106 on the secondnetwork 104. The appliance 205 receives the intercepted communicationfrom the client agent, decrypts the communications, and transmits thecommunication to the server 106 on the second network 104 via the secondtransport layer connection. The second transport layer connection may bea pooled transport layer connection. In one embodiment, the appliance205 provides an end-to-end secure transport layer connection for theclient 102 between the two networks 104, 104′

In one embodiment, the appliance 205 hosts an intranet internet protocolor intranetIP address of the client 102 on the virtual private network104. The client 102 has a local network identifier, such as an internetprotocol (IP) address and/or host name on the first network 104. Whenconnected to the second network 104′ via the appliance 205, theappliance 205 establishes, assigns or otherwise provides an IntranetIP,which is a network identifier, such as IP address and/or host name, forthe client 102 on the second network 104′. The appliance 205 listens forand receives on the second or private network 104′ for anycommunications directed towards the client 102 using the client'sestablished IntranetIP. In one embodiment, the appliance 205 acts as oron behalf of the client 102 on the second private network 104.

In some embodiment, the appliance 205 has an encryption engine providinglogic, business rules, functions or operations for handling theprocessing of any security related protocol, such as SSL or TLS, or anyfunction related thereto. For example, the encryption engine encryptsand decrypts network packets, or any portion thereof, communicated viathe appliance 205. The encryption engine may also setup or establish SSLor TLS connections on behalf of the client 102 a-102 n, server 106 a-106n, or appliance 200, 205. As such, the encryption engine providesoffloading and acceleration of SSL processing. In one embodiment, theencryption engine uses a tunneling protocol to provide a virtual privatenetwork between a client 102 a-102 n and a server 106 a-106 n. In someembodiments, the encryption engine uses an encryption processor. Inother embodiments, the encryption engine includes executableinstructions running on an encryption processor.

In some embodiments, the appliance 205 provides one or more of thefollowing acceleration techniques to communications between the client102 and server 106: 1) compression, 2) decompression, 3) TransmissionControl Protocol pooling, 4) Transmission Control Protocol multiplexing,5) Transmission Control Protocol buffering, and 6) caching. In oneembodiment, the appliance 200 relieves servers 106 of much of theprocessing load caused by repeatedly opening and closing transportlayers connections to clients 102 by opening one or more transport layerconnections with each server 106 and maintaining these connections toallow repeated data accesses by clients via the Internet. This techniqueis referred to herein as “connection pooling”.

In some embodiments, in order to seamlessly splice communications from aclient 102 to a server 106 via a pooled transport layer connection, theappliance 205 translates or multiplexes communications by modifyingsequence number and acknowledgment numbers at the transport layerprotocol level. This is referred to as “connection multiplexing”. Insome embodiments, no application layer protocol interaction is required.For example, in the case of an in-bound packet (that is, a packetreceived from a client 102), the source network address of the packet ischanged to that of an output port of appliance 205, and the destinationnetwork address is changed to that of the intended server. In the caseof an outbound packet (that is, one received from a server 106), thesource network address is changed from that of the server 106 to that ofan output port of appliance 205 and the destination address is changedfrom that of appliance 205 to that of the requesting client 102. Thesequence numbers and acknowledgment numbers of the packet are alsotranslated to sequence numbers and acknowledgement expected by theclient 102 on the appliance's 205 transport layer connection to theclient 102. In some embodiments, the packet checksum of the transportlayer protocol is recalculated to account for these translations.

In another embodiment, the appliance 205 provides switching orload-balancing functionality for communications between the client 102and server 106. In some embodiments, the appliance 205 distributestraffic and directs client requests to a server 106 based on layer 4payload or application-layer request data. In one embodiment, althoughthe network layer or layer 2 of the network packet identifies adestination server 106, the appliance 205 determines the server 106 todistribute the network packet by application information and datacarried as payload of the transport layer packet. In one embodiment, ahealth monitoring program of the appliance 205 monitors the health ofservers to determine the server 106 for which to distribute a client'srequest. In some embodiments, if the appliance 205 detects a server 106is not available or has a load over a predetermined threshold, theappliance 205 can direct or distribute client requests to another server106.

In some embodiments, the appliance 205 acts as a Domain Name Service(DNS) resolver or otherwise provides resolution of a DNS request fromclients 102. In some embodiments, the appliance intercepts' a DNSrequest transmitted by the client 102. In one embodiment, the appliance205 responds to a client's DNS request with an IP address of or hostedby the appliance 205. In this embodiment, the client 102 transmitsnetwork communication for the domain name to the appliance 200. Inanother embodiment, the appliance 200 responds to a client's DNS requestwith an IP address of or hosted by a second appliance 200′. In someembodiments, the appliance 205 responds to a client's DNS request withan IP address of a server 106 determined by the appliance 200.

In yet another embodiment, the appliance 205 provides applicationfirewall functionality for communications between the client 102 andserver 106. In one embodiment, a policy engine 295′ provides rules fordetecting and blocking illegitimate requests. In some embodiments, theapplication firewall protects against denial of service (DoS) attacks.In other embodiments, the appliance inspects the content of interceptedrequests to identify and block application-based attacks. In someembodiments, the rules/policy engine includes one or more applicationfirewall or security control policies for providing protections againstvarious classes and types of web or Internet based vulnerabilities, suchas one or more of the following: 1) buffer overflow, 2) CGI-BINparameter manipulation, 3) form/hidden field manipulation, 4) forcefulbrowsing, 5) cookie or session poisoning, 6) broken access control list(ACLs) or weak passwords, 7) cross-site scripting (XSS), 8) commandinjection, 9) SQL injection, 10) error triggering sensitive informationleak, 11) insecure use of cryptography, 12) server misconfiguration, 13)back doors and debug options, 14) website defacement, 15) platform oroperating systems vulnerabilities, and 16) zero-day exploits. In anembodiment, the application firewall of the appliance provides HTML formfield protection in the form of inspecting or analyzing the networkcommunication for one or more of the following: 1) required fields arereturned, 2) no added field allowed, 3) read-only and hidden fieldenforcement, 4) drop-down list and radio button field conformance, and5) form-field max-length enforcement. In some embodiments, theapplication firewall of the appliance 205 ensures cookies are notmodified. In other embodiments, the appliance 205 protects againstforceful browsing by enforcing legal URLs.

In still yet other embodiments, the application firewall appliance 205protects any confidential information contained in the networkcommunication. The appliance 205 may inspect or analyze any networkcommunication in accordance with the rules or polices of the policyengine to identify any confidential information in any field of thenetwork packet. In some embodiments, the application firewall identifiesin the network communication one or more occurrences of a credit cardnumber, password, social security number, name, patient code, contactinformation, and age. The encoded portion of the network communicationmay include these occurrences or the confidential information. Based onthese occurrences, in one embodiment, the application firewall may takea policy action on the network communication, such as preventtransmission of the network communication. In another embodiment, theapplication firewall may rewrite, remove or otherwise mask suchidentified occurrence or confidential information.

Although generally referred to as a network optimization or firstappliance 200 and a second appliance 205, the first appliance 200 andsecond appliance 205 may be the same type and form of appliance. In oneembodiment, the second appliance 205 may perform the same functionality,or portion thereof, as the first appliance 200, and vice-versa. Forexample, the first appliance 200 and second appliance 205 may bothprovide acceleration techniques. In one embodiment, the first appliancemay perform LAN acceleration while the second appliance performs WANacceleration, or vice-versa. In another example, the first appliance 200may also be a transport control protocol terminating device as with thesecond appliance 205. Furthermore, although appliances 200 and 205 areshown as separate devices on the network, the appliance 200 and/or 205could be a part of any client 102 or server 106.

Referring now to FIG. 1C, other embodiments of a network environment fordeploying the appliance 200 are depicted. In another embodiment asdepicted on the top of FIG. 1C, the appliance 200 may be deployed as asingle appliance or single proxy on the network 104. For example, theappliance 200 may be designed, constructed or adapted to perform WANoptimization techniques discussed herein without a second cooperatingappliance 200′. In other embodiments as depicted on the bottom of FIG.1C, a single appliance 200 may be deployed with one or more secondappliances 205. For example, a WAN acceleration first appliance 200,such as a Citrix WANScaler appliance, may be deployed with a LANaccelerating or Application Firewall second appliance 205, such as aCitrix NetScaler appliance.

Computing Device

The client 102, server 106, and appliance 200 and 205 may be deployed asand/or executed on any type and form of computing device, such as acomputer, network device or appliance capable of communicating on anytype and form of network and performing the operations described herein.FIGS. 1C and 1D depict block diagrams of a computing device 100 usefulfor practicing an embodiment of the client 102, server 106 or appliance200. As shown in FIGS. 1C and 1D, each computing device 100 includes acentral processing unit 101, and a main memory unit 122. As shown inFIG. 1C, a computing device 100 may include a visual display device 124,a keyboard 126 and/or a pointing device 127, such as a mouse. Eachcomputing device 100 may also include additional optional elements, suchas one or more input/output devices 130 a-130 b (generally referred tousing reference numeral 130), and a cache memory 140 in communicationwith the central processing unit 101.

The central processing unit 101 is any logic circuitry that responds toand processes instructions fetched from the main memory unit 122. Inmany embodiments, the central processing unit is provided by amicroprocessor unit, such as: those manufactured by Intel Corporation ofMountain View, Calif.; those manufactured by Motorola Corporation ofSchaumburg, Ill.; those manufactured by Transmeta Corporation of SantaClara, Calif.; the RS/6000 processor, those manufactured byInternational Business Machines of White Plains, N.Y.; or thosemanufactured by Advanced Micro Devices of Sunnyvale, Calif. Thecomputing device 100 may be based on any of these processors, or anyother processor capable of operating as described herein.

Main memory unit 122 may be one or more memory chips capable of storingdata and allowing any storage location to be directly accessed by themicroprocessor 101, such as Static random access memory (SRAM), BurstSRAM or SynchBurst SRAM (BSRAM), Dynamic random access memory (DRAM),Fast Page Mode DRAM (FPM DRAM), Enhanced DRAM (EDRAM), Extended DataOutput RAM (EDO RAM), Extended Data Output DRAM (EDO DRAM), BurstExtended Data Output DRAM (BEDO DRAM), Enhanced DRAM (EDRAM),synchronous DRAM (SDRAM), JEDEC SRAM, PC100 SDRAM, Double Data RateSDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), SyncLink DRAM (SLDRAM),Direct Rambus DRAM (DRDRAM), or Ferroelectric RAM (FRAM). The mainmemory 122 may be based on any of the above described memory chips, orany other available memory chips capable of operating as describedherein. In the embodiment shown in FIG. 1C, the processor 101communicates with main memory 122 via a system bus 150 (described inmore detail below). FIG. 1C depicts an embodiment of a computing device100 in which the processor communicates directly with main memory 122via a memory port 103. For example, in FIG. 1D the main memory 122 maybe DRDRAM.

FIG. 1D depicts an embodiment in which the main processor 101communicates directly with cache memory 140 via a secondary bus,sometimes referred to as a backside bus. In other embodiments, the mainprocessor 101 communicates with cache memory 140 using the system bus150. Cache memory 140 typically has a faster response time than mainmemory 122 and is typically provided by SRAM, BSRAM, or EDRAM. In theembodiment shown in FIG. 1C, the processor 101 communicates with variousI/O devices 130 via a local system bus 150. Various busses may be usedto connect the central processing unit 101 to any of the I/O devices130, including a VESA VL bus, an ISA bus, an EISA bus, a MicroChannelArchitecture (MCA) bus, a PCI bus, a PCI-X bus, a PCI-Express bus, or aNuBus. For embodiments in which the I/O device is a video display 124,the processor 101 may use an Advanced Graphics Port (AGP) to communicatewith the display 124. FIG. 1D depicts an embodiment of a computer 100 inwhich the main processor 101 communicates directly with I/O device 130via HyperTransport, Rapid I/O, or InfiniBand. FIG. 1D also depicts anembodiment in which local busses and direct communication are mixed: theprocessor 101 communicates with I/O device 130 using a localinterconnect bus while communicating with I/O device 130 directly.

The computing device 100 may support any suitable installation device116, such as a floppy disk drive for receiving floppy disks such as3.5-inch, 5.25-inch disks or ZIP disks, a CD-ROM drive, a CD-R/RW drive,a DVD-ROM drive, tape drives of various formats, USB device, hard-driveor any other device suitable for installing software and programs suchas any client agent 120, or portion thereof. The computing device 100may further comprise a storage device 128, such as one or more hard diskdrives or redundant arrays of independent disks, for storing anoperating system and other related software, and for storing applicationsoftware programs such as any program related to the client agent 120.Optionally, any of the installation devices 116 could also be used asthe storage device 128. Additionally, the operating system and thesoftware can be run from a bootable medium, for example, a bootable CD,such as KNOPPIX®, a bootable CD for GNU/Linux that is available as aGNU/Linux distribution from knoppix.net.

Furthermore, the computing device 100 may include a network interface118 to interface to a Local Area Network (LAN), Wide Area Network (WAN)or the Internet through a variety of connections including, but notlimited to, standard telephone lines, LAN or WAN links (e.g., 802.11,T1, T3, 56 kb, X.25), broadband connections (e.g., ISDN, Frame Relay,ATM), wireless connections, or some combination of any or all of theabove. The network interface 118 may comprise a built-in networkadapter, network interface card, PCMCIA network card, card bus networkadapter, wireless network adapter, USB network adapter, modem or anyother device suitable for interfacing the computing device 100 to anytype of network capable of communication and performing the operationsdescribed herein. A wide variety of I/O devices 130 a-130 n may bepresent in the computing device 100. Input devices include keyboards,mice, trackpads, trackballs, microphones, and drawing tablets. Outputdevices include video displays, speakers, inkjet printers, laserprinters, and dye-sublimation printers. The I/O devices 130 may becontrolled by an I/O controller 123 as shown in FIG. 1C. The I/Ocontroller may control one or more I/O devices such as a keyboard 126and a pointing device 127, e.g., a mouse or optical pen. Furthermore, anI/O device may also provide storage 128 and/or an installation medium116 for the computing device 100. In still other embodiments, thecomputing device 100 may provide USB connections to receive handheld USBstorage devices such as the USB Flash Drive line of devices manufacturedby Twintech Industry, Inc. of Los Alamitos, Calif.

In some embodiments, the computing device 100 may comprise or beconnected to multiple display devices 124 a-124 n, which each may be ofthe same or different type and/or form. As such, any of the I/O devices130 a-130 n and/or the I/O controller 123 may comprise any type and/orform of suitable hardware, software, or combination of hardware andsoftware to support, enable or provide for the connection and use ofmultiple display devices 124 a-124 n by the computing device 100. Forexample, the computing device 100 may include any type and/or form ofvideo adapter, video card, driver, and/or library to interface,communicate, connect or otherwise use the display devices 124 a-124 n.In one embodiment, a video adapter may comprise multiple connectors tointerface to multiple display devices 124 a-124 n. In other embodiments,the computing device 100 may include multiple video adapters, with eachvideo adapter connected to one or more of the display devices 124 a-124n. In some embodiments, any portion of the operating system of thecomputing device 100 may be configured for using multiple displays 124a-124 n. In other embodiments, one or more of the display devices 124a-124 n may be provided by one or more other computing devices, such ascomputing devices 100 a and 100 b connected to the computing device 100,for example, via a network. These embodiments may include any type ofsoftware designed and constructed to use another computer's displaydevice as a second display device 124 a for the computing device 100.One ordinarily skilled in the art will recognize and appreciate thevarious ways and embodiments that a computing device 100 may beconfigured to have multiple display devices 124 a-124 n.

In further embodiments, an I/O device 130 may be a bridge 170 betweenthe system bus 150 and an external communication bus, such as a USB bus,an Apple Desktop Bus, an RS-232 serial connection, a SCSI bus, aFireWire bus, a FireWire 800 bus, an Ethernet bus, an AppleTalk bus, aGigabit Ethernet bus, an Asynchronous Transfer Mode bus, a HIPPI bus, aSuper HIPPI bus, a SerialPlus bus, a SCI/LAMP bus, a FibreChannel bus,or a Serial Attached small computer system interface bus.

A computing device 100 of the sort depicted in FIGS. 1C and 1D typicallyoperate under the control of operating systems, which control schedulingof tasks and access to system resources. The computing device 100 can berunning any operating system such as any of the versions of theMicrosoft® Windows operating systems, the different releases of the Unixand Linux operating systems, any version of the Mac OS® or OS X forMacintosh computers, any embedded operating system, any real-timeoperating system, any open source operating system, any proprietaryoperating system, any operating systems for mobile computing devices, orany other operating system capable of running on the computing deviceand performing the operations described herein. Typical operatingsystems include: WINDOWS 3.x, WINDOWS 95, WINDOWS 98, WINDOWS 2000,WINDOWS NT 3.51, WINDOWS NT 4.0, WINDOWS CE, WINDOWS 2003, WINDOWS XP,and WINDOWS VISTA all of which are manufactured by Microsoft Corporationof Redmond, Wash.; MacOS and OS X, manufactured by Apple Computer ofCupertino, Calif.; OS/2, manufactured by International Business Machinesof Armonk, N.Y.; and Linux, a freely-available operating systemdistributed by Caldera Corp. of Salt Lake City, Utah, or any type and/orform of a Unix operating system, (such as those versions of Unixreferred to as Solaris/Sparc, Solaris/x86, AIX IBM, HP UX, and SGI(Silicon Graphics)), among others.

In other embodiments, the computing device 100 may have differentprocessors, operating systems, and input devices consistent with thedevice. For example, in one embodiment the computer 100 is a Treo 180,270, 1060, 600 or 650 smart phone manufactured by Palm, Inc. In thisembodiment, the Treo smart phone is operated under the control of thePalmOS operating system and includes a stylus input device as well as afive-way navigator device. In another example, the computing device 100may be a WinCE or PocketPC device with an ARM (Advanced RISC Machine)type of processor. In one example, the computing device 100 includes aSeries 80 (Nokia 9500 or Nokia 9300) type of smart phone manufactured byNokia of Finland, which may run the Symbian OS or EPOC mobile operatingsystem manufactured by Symbian Software Limited of London, UnitedKingdom. In another example, the computing device 100 may include a FOMAM100 brand smart phone manufactured by Motorola, Inc. of Schaumburg,Ill., and operating the EPOC or Symbian OS operating system. In yetanother example, the computing device 100 includes a Sony Ericsson P800,P900 or P910 Alpha model phone manufactured by Sony Ericsson MobileCommunications (USA) Inc. of Research Triangle Park, N.C. Moreover, thecomputing device 100 can be any workstation, desktop computer, laptop ornotebook computer, server, handheld computer, mobile telephone, smartphone, any other computer, or other form of computing ortelecommunications device that is capable of communication and that hassufficient processor power and memory capacity to perform the operationsdescribed herein.

B. System and Appliance Architecture

Referring now to FIG. 2A, an embodiment of a system environment andarchitecture of an appliance 200 for delivering and/or operating acomputing environment on a client is depicted. In some embodiments, aserver 106 includes an application delivery system 290 for delivering acomputing environment or an application and/or data file to one or moreclients 102. In brief overview, a client 102 is in communication with aserver 106 via network 104 and appliance 200. For example, the client102 may reside in a remote office of a company, e.g., a branch office,and the server 106 may reside at a corporate data center. The client 102has a client agent 120, and a computing environment 215. The computingenvironment 215 may execute or operate an application that accesses,processes or uses a data file. The computing environment 215,application and/or data file may be delivered via the appliance 200and/or the server 106.

In some embodiments, the appliance 200 accelerates delivery of acomputing environment 215, or any portion thereof, to a client 102. Inone embodiment, the appliance 200 accelerates the delivery of thecomputing environment 215 by the application delivery system 290. Forexample, the embodiments described herein may be used to acceleratedelivery of a streaming application and data file processable by theapplication from a central corporate data center to a remote userlocation, such as a branch office of the company. In another embodiment,the appliance 200 accelerates transport layer traffic between a client102 and a server 106. In another embodiment, the appliance 200 controls,manages, or adjusts the transport layer protocol to accelerate deliveryof the computing environment. In some embodiments, the appliance 200uses caching and/or compression techniques to accelerate delivery of acomputing environment.

In some embodiments, the application delivery management system 290provides application delivery techniques to deliver a computingenvironment to a desktop of a user, remote or otherwise, based on aplurality of execution methods and based on any authentication andauthorization policies applied via a policy engine 295. With thesetechniques, a remote user may obtain a computing environment and accessto server stored applications and data files from any network connecteddevice 100. In one embodiment, the application delivery system 290 mayreside or execute on a server 106. In another embodiment, theapplication delivery system 290 may reside or execute on a plurality ofservers 106 a-106 n. In some embodiments, the application deliverysystem 290 may execute in a server farm 38. In one embodiment, theserver 106 executing the application delivery system 290 may also storeor provide the application and data file. In another embodiment, a firstset of one or more servers 106 may execute the application deliverysystem 290, and a different server 106 n may store or provide theapplication and data file. In some embodiments, each of the applicationdelivery system 290, the application, and data file may reside or belocated on different servers. In yet another embodiment, any portion ofthe application delivery system 290 may reside, execute or be stored onor distributed to the appliance 200, or a plurality of appliances.

The client 102 may include a computing environment 215 for executing anapplication that uses or processes a data file. The client 102 vianetworks 104, 104′ and appliance 200 may request an application and datafile from the server 106. In one embodiment, the appliance 200 mayforward a request from the client 102 to the server 106. For example,the client 102 may not have the application and data file stored oraccessible locally. In response to the request, the application deliverysystem 290 and/or server 106 may deliver the application and data fileto the client 102. For example, in one embodiment, the server 106 maytransmit the application as an application stream to operate incomputing environment 215 on client 102.

In some embodiments, the application delivery system 290 comprises anyportion of the Citrix Access Suite™ by Citrix Systems, Inc., such as theMetaFrame or Citrix Presentation Server™ and/or any of the Microsoft®Windows Terminal Services manufactured by the Microsoft Corporation. Inone embodiment, the application delivery system 290 may deliver one ormore applications to clients 102 or users via a remote-display protocolor otherwise via remote-based or server-based computing. In anotherembodiment, the application delivery system 290 may deliver one or moreapplications to clients or users via steaming of the application.

In one embodiment, the application delivery system 290 includes a policyengine 295 for controlling and managing the access to applications,selection of application execution methods and the delivery ofapplications. In some embodiments, the policy engine 295 determines theone or more applications a user or client 102 may access. In anotherembodiment, the policy engine 295 determines how the application shouldbe delivered to the user or client 102, e.g., the method of execution.In some embodiments, the application delivery system 290 provides aplurality of delivery techniques from which to select a method ofapplication execution, such as a server-based computing, streaming ordelivering the application locally to the client 120 for localexecution.

In one embodiment, a client 102 requests execution of an applicationprogram and the application delivery system 290 comprising a server 106selects a method of executing the application program. In someembodiments, the server 106 receives credentials from the client 102. Inanother embodiment, the server 106 receives a request for an enumerationof available applications from the client 102. In one embodiment, inresponse to the request or receipt of credentials, the applicationdelivery system 290 enumerates a plurality of application programsavailable to the client 102. The application delivery system 290receives a request to execute an enumerated application. The applicationdelivery system 290 selects one of a predetermined number of methods forexecuting the enumerated application, for example, responsive to apolicy of a policy engine. The application delivery system 290 mayselect a method of execution of the application enabling the client 102to receive application-output data generated by execution of theapplication program on a server 106. The application delivery system 290may select a method of execution of the application enabling the clientor local machine 102 to execute the application program locally afterretrieving a plurality of application files comprising the application.In yet another embodiment, the application delivery system 290 mayselect a method of execution of the application to stream theapplication via the network 104 to the client 102.

A client 102 may execute, operate or otherwise provide an application,which can be any type and/or form of software, program, or executableinstructions such as any type and/or form of web browser, web-basedclient, client-server application, a thin-client computing client, anActiveX control, or a Java applet, or any other type and/or form ofexecutable instructions capable of executing on client 102. In someembodiments, the application may be a server-based or a remote-basedapplication executed on behalf of the client 102 on a server 106. In oneembodiment the server 106 may display output to the client 102 using anythin-client or remote-display protocol, such as the IndependentComputing Architecture (ICA) protocol manufactured by Citrix Systems,Inc. of Ft. Lauderdale, Fla. or the Remote Desktop Protocol (RDP)manufactured by the Microsoft Corporation of Redmond, Wash. Theapplication can use any type of protocol and it can be, for example, anHTTP client, an FTP client, an Oscar client, or a Telnet client. Inother embodiments, the application comprises any type of softwarerelated to VoIP communications, such as a soft IP telephone. In furtherembodiments, the application comprises any application related toreal-time data communications, such as applications for streaming videoand/or audio.

In some embodiments, the server 106 or a server farm 38 may be runningone or more applications, such as an application providing a thin-clientcomputing or remote display presentation application. In one embodiment,the server 106 or server farm 38 executes, as an application, anyportion of the Citrix Access Suite™ by Citrix Systems, Inc., such as theMetaFrame or Citrix Presentation Server™, and/or any of the Microsoft®Windows Terminal Services manufactured by the Microsoft Corporation. Inone embodiment, the application is an ICA client, developed by CitrixSystems, Inc. of Fort Lauderdale, Fla. In other embodiments, theapplication includes a Remote Desktop (RDP) client, developed byMicrosoft Corporation of Redmond, Wash. Also, the server 106 may run anapplication, which for example, may be an application server providingemail services such as Microsoft Exchange manufactured by the MicrosoftCorporation of Redmond, Wash., a web or Internet server, or a desktopsharing server, or a collaboration server. In some embodiments, any ofthe applications may comprise any type of hosted service or products,such as GoToMeeting™ provided by Citrix Online Division, Inc. of SantaBarbara, Calif., WebEx™ provided by WebEx, Inc. of Santa Clara, Calif.,or Microsoft Office Live Meeting provided by Microsoft Corporation ofRedmond, Wash.

Example Appliance Architecture

FIG. 2A also illustrates an example embodiment of the appliance 200. Thearchitecture of the appliance 200 in FIG. 2A is provided by way ofillustration only and is not intended to be limiting in any manner. Theappliance 200 may include any type and form of computing device 100,such as any element or portion described in conjunction with FIGS. 1Dand 1E above. In brief overview, the appliance 200 has one or morenetwork ports 266A-226N and one or more networks stacks 267A-267N forreceiving and/or transmitting communications via networks 104. Theappliance 200 also has a network optimization engine 250 for optimizing,accelerating or otherwise improving the performance, operation, orquality of any network traffic or communications traversing theappliance 200.

The appliance 200 includes or is under the control of an operatingsystem. The operating system of the appliance 200 may be any type and/orform of Unix operating system although the invention is not so limited.As such, the appliance 200 can be running any operating system such asany of the versions of the Microsoft® Windows operating systems, thedifferent releases of the Unix and Linux operating systems, any versionof the Mac OS® for Macintosh computers, any embedded operating system,any network operating system, any real-time operating system, any opensource operating system, any proprietary operating system, any operatingsystems for mobile computing devices or network devices, or any otheroperating system capable of running on the appliance 200 and performingthe operations described herein.

The operating system of appliance 200 allocates, manages, or otherwisesegregates the available system memory into what is referred to askernel or system space, and user or application space. The kernel spaceis typically reserved for running the kernel, including any devicedrivers, kernel extensions or other kernel related software. As known tothose skilled in the art, the kernel is the core of the operatingsystem, and provides access, control, and management of resources andhardware-related elements of the appliance 200. In accordance with anembodiment of the appliance 200, the kernel space also includes a numberof network services or processes working in conjunction with the networkoptimization engine 250, or any portion thereof. Additionally, theembodiment of the kernel will depend on the embodiment of the operatingsystem installed, configured, or otherwise used by the device 200. Incontrast to kernel space, user space is the memory area or portion ofthe operating system used by user mode applications or programsotherwise running in user mode. A user mode application may not accesskernel space directly and uses service calls in order to access kernelservices. The operating system uses the user or application space forexecuting or running applications and provisioning of user levelprograms, services, processes and/or tasks.

The appliance 200 has one or more network ports 266 for transmitting andreceiving data over a network 104. The network port 266 provides aphysical and/or logical interface between the computing device and anetwork 104 or another device 100 for transmitting and receiving networkcommunications. The type and form of network port 266 depends on thetype and form of network and type of medium for connecting to thenetwork. Furthermore, any software of, provisioned for or used by thenetwork port 266 and network stack 267 may run in either kernel space oruser space.

In one embodiment, the appliance 200 has one network stack 267, such asa TCP/IP based stack, for communicating on a network 105, such with theclient 102 and/or the server 106. In one embodiment, the network stack267 is used to communicate with a first network, such as network 104,and also with a second network 104′. In another embodiment, theappliance 200 has two or more network stacks, such as first networkstack 267A and a second network stack 267N. The first network stack 267Amay be used in conjunction with a first port 266A to communicate on afirst network 104. The second network stack 267N may be used inconjunction with a second port 266N to communicate on a second network104′. In one embodiment, the network stack(s) 267 has one or morebuffers for queuing one or more network packets for transmission by theappliance 200.

The network stack 267 includes any type and form of software, orhardware, or any combinations thereof, for providing connectivity to andcommunications with a network. In one embodiment, the network stack 267includes a software implementation for a network protocol suite. Thenetwork stack 267 may have one or more network layers, such as anynetworks layers of the Open Systems Interconnection (OSI) communicationsmodel as those skilled in the art recognize and appreciate. As such, thenetwork stack 267 may have any type and form of protocols for any of thefollowing layers of the OSI model: 1) physical link layer, 2) data linklayer, 3) network layer, 4) transport layer, 5) session layer, 6)presentation layer, and 7) application layer. In one embodiment, thenetwork stack 267 includes a transport control protocol (TCP) over thenetwork layer protocol of the internet protocol (IP), generally referredto as TCP/IP. In some embodiments, the TCP/IP protocol may be carriedover the Ethernet protocol, which may comprise any of the family of IEEEwide-area-network (WAN) or local-area-network (LAN) protocols, such asthose protocols covered by the IEEE 802.3. In some embodiments, thenetwork stack 267 has any type and form of a wireless protocol, such asIEEE 802.11 and/or mobile internet protocol.

In view of a TCP/IP based network, any TCP/IP based protocol may beused, including Messaging Application Programming Interface (MAPI)(email), File Transfer Protocol (FTP), HyperText Transfer Protocol(HTTP), Common Internet File System (CIFS) protocol (file transfer),Independent Computing Architecture (ICA) protocol, Remote DesktopProtocol (RDP), Wireless Application Protocol (WAP), Mobile IP protocol,and Voice Over IP (VoIP) protocol. In another embodiment, the networkstack 267 comprises any type and form of transport control protocol,such as a modified transport control protocol, for example a TransactionTCP (T/TCP), TCP with selection acknowledgements (TCP-SACK), TCP withlarge windows (TCP-LW), a congestion prediction protocol such as theTCP-Vegas protocol, and a TCP spoofing protocol. In other embodiments,any type and form of user datagram protocol (UDP), such as UDP over IP,may be used by the network stack 267, such as for voice communicationsor real-time data communications.

Furthermore, the network stack 267 may include one or more networkdrivers supporting the one or more layers, such as a TCP driver or anetwork layer driver. The network drivers may be included as part of theoperating system of the computing device 100 or as part of any networkinterface cards or other network access components of the computingdevice 100. In some embodiments, any of the network drivers of thenetwork stack 267 may be customized, modified or adapted to provide acustom or modified portion of the network stack 267 in support of any ofthe techniques described herein.

In one embodiment, the appliance 200 provides for or maintains atransport layer connection between a client 102 and server 106 using asingle network stack 267. In some embodiments, the appliance 200effectively terminates the transport layer connection by changing,managing or controlling the behavior of the transport control protocolconnection between the client and the server. In these embodiments, theappliance 200 may use a single network stack 267. In other embodiments,the appliance 200 terminates a first transport layer connection, such asa TCP connection of a client 102, and establishes a second transportlayer connection to a server 106 for use by or on behalf of the client102, e.g., the second transport layer connection is terminated at theappliance 200 and the server 106. The first and second transport layerconnections may be established via a single network stack 267. In otherembodiments, the appliance 200 may use multiple network stacks, forexample 267A and 267N. In these embodiments, the first transport layerconnection may be established or terminated at one network stack 267A,and the second transport layer connection may be established orterminated on the second network stack 267N. For example, one networkstack may be for receiving and transmitting network packets on a firstnetwork, and another network stack for receiving and transmittingnetwork packets on a second network.

As shown in FIG. 2A, the network optimization engine 250 includes one ormore of the following elements, components or modules: network packetprocessing engine 240, LAN/WAN detector 210, flow controller 220, QoSengine 236, protocol accelerator 234, compression engine 238, cachemanager 232 and policy engine 295′. The network optimization engine 250,or any portion thereof, may include software, hardware or anycombination of software and hardware. Furthermore, any software of,provisioned for or used by the network optimization engine 250 may runin either kernel space or user space. For example, in one embodiment,the network optimization engine 250 may run in kernel space. In anotherembodiment, the network optimization engine 250 may run in user space.In yet another embodiment, a first portion of the network optimizationengine 250 runs in kernel space while a second portion of the networkoptimization engine 250 runs in user space.

Network Packet Processing Engine

The network packet engine 240, also generally referred to as a packetprocessing engine or packet engine, is responsible for controlling andmanaging the processing of packets received and transmitted by appliance200 via network ports 266 and network stack(s) 267. The network packetengine 240 may operate at any layer of the network stack 267. In oneembodiment, the network packet engine 240 operates at layer 2 or layer 3of the network stack 267. In some embodiments, the packet engine 240intercepts or otherwise receives packets at the network layer, such asthe IP layer in a TCP/IP embodiment. In another embodiment, the packetengine 240 operates at layer 4 of the network stack 267. For example, insome embodiments, the packet engine 240 intercepts or otherwise receivespackets at the transport layer, such as intercepting packets as the TCPlayer in a TCP/IP embodiment. In other embodiments, the packet engine240 operates at any session or application layer above layer 4. Forexample, in one embodiment, the packet engine 240 intercepts orotherwise receives network packets above the transport layer protocollayer, such as the payload of a TCP packet in a TCP embodiment.

The packet engine 240 may include a buffer for queuing one or morenetwork packets during processing, such as for receipt of a networkpacket or transmission of a network packet. Additionally, the packetengine 240 is in communication with one or more network stacks 267 tosend and receive network packets via network ports 266. The packetengine 240 may include a packet processing timer. In one embodiment, thepacket processing timer provides one or more time intervals to triggerthe processing of incoming, i.e., received, or outgoing, i.e.,transmitted, network packets. In some embodiments, the packet engine 240processes network packets responsive to the timer. The packet processingtimer provides any type and form of signal to the packet engine 240 tonotify, trigger, or communicate a time related event, interval oroccurrence. In many embodiments, the packet processing timer operates inthe order of milliseconds, such as for example 100 ms, 50 ms, 25 ms, 10ms, 5 ms or 1 ms.

During operations, the packet engine 240 may be interfaced, integratedor be in communication with any portion of the network optimizationengine 250, such as the LAN/WAN detector 210, flow controller 220, QoSengine 236, protocol accelerator 234, compression engine 238, cachemanager 232 and/or policy engine 295′. As such, any of the logic,functions, or operations of the LAN/WAN detector 210, flow controller220, QoS engine 236, protocol accelerator 234, compression engine 238,cache manager 232 and policy engine 295′ may be performed responsive tothe packet processing timer and/or the packet engine 240. In someembodiments, any of the logic, functions, or operations of theencryption engine 234, cache manager 232, policy engine 236 andmulti-protocol compression logic 238 may be performed at the granularityof time intervals provided via the packet processing timer, for example,at a time interval of less than or equal to 10 ms. For example, in oneembodiment, the cache manager 232 may perform expiration of any cachedobjects responsive to the integrated packet engine 240 and/or the packetprocessing timer 242. In another embodiment, the expiry or invalidationtime of a cached object can be set to the same order of granularity asthe time interval of the packet processing timer, such as at every 10ms.

Cache Manager

The cache manager 232 may include software, hardware or any combinationof software and hardware to store data, information and objects to acache in memory or storage, provide cache access, and control and managethe cache. The data, objects or content processed and stored by thecache manager 232 may include data in any format, such as a markuplanguage, or any type of data communicated via any protocol. In someembodiments, the cache manager 232 duplicates original data storedelsewhere or data previously computed, generated or transmitted, inwhich the original data may require longer access time to fetch, computeor otherwise obtain relative to reading a cache memory or storageelement. Once the data is stored in the cache, future use can be made byaccessing the cached copy rather than refetching or recomputing theoriginal data, thereby reducing the access time. In some embodiments,the cache may comprise a data object in memory of the appliance 200. Inanother embodiment, the cache may comprise any type and form of storageelement of the appliance 200, such as a portion of a hard disk. In someembodiments, the processing unit of the device may provide cache memoryfor use by the cache manager 232. In yet further embodiments, the cachemanager 232 may use any portion and combination of memory, storage, orthe processing unit for caching data, objects, and other content.

Furthermore, the cache manager 232 includes any logic, functions, rules,or operations to perform any caching techniques of the appliance 200. Insome embodiments, the cache manager 232 may operate as an application,library, program, service, process, thread or task. In some embodiments,the cache manager 232 can comprise any type of general purpose processor(GPP), or any other type of integrated circuit, such as a FieldProgrammable Gate Array (FPGA), Programmable Logic Device (PLD), orApplication Specific Integrated Circuit (ASIC).

Policy Engine

The policy engine 295′ includes any logic, function or operations forproviding and applying one or more policies or rules to the function,operation or configuration of any portion of the appliance 200. Thepolicy engine 295′ may include, for example, an intelligent statisticalengine or other programmable application(s). In one embodiment, thepolicy engine 295 provides a configuration mechanism to allow a user toidentify, specify, define or configure a policy for the networkoptimization engine 250, or any portion thereof. For example, the policyengine 295 may provide policies for what data to cache, when to cachethe data, for whom to cache the data, when to expire an object in cacheor refresh the cache. In other embodiments, the policy engine 236 mayinclude any logic, rules, functions or operations to determine andprovide access, control and management of objects, data or content beingcached by the appliance 200 in addition to access, control andmanagement of security, network traffic, network access, compression orany other function or operation performed by the appliance 200.

In some embodiments, the policy engine 295′ provides and applies one ormore policies based on any one or more of the following: a user,identification of the client, identification of the server, the type ofconnection, the time of the connection, the type of network, or thecontents of the network traffic. In one embodiment, the policy engine295′ provides and applies a policy based on any field or header at anyprotocol layer of a network packet. In another embodiment, the policyengine 295′ provides and applies a policy based on any payload of anetwork packet. For example, in one embodiment, the policy engine 295′applies a policy based on identifying a certain portion of content of anapplication layer protocol carried as a payload of a transport layerpacket. In another example, the policy engine 295′ applies a policybased on any information identified by a client, server or usercertificate. In yet another embodiment, the policy engine 295′ applies apolicy based on any attributes or characteristics obtained about aclient 102, such as via any type and form of endpoint detection (see forexample the collection agent of the client agent discussed below).

In one embodiment, the policy engine 295′ works in conjunction orcooperation with the policy engine 295 of the application deliverysystem 290. In some embodiments, the policy engine 295′ is a distributedportion of the policy engine 295 of the application delivery system 290.In another embodiment, the policy engine 295 of the application deliverysystem 290 is deployed on or executed on the appliance 200. In someembodiments, the policy engines 295, 295′ both operate on the appliance200. In yet another embodiment, the policy engine 295′, or a portionthereof, of the appliance 200 operates on a server 106.

Multi-Protocol and Multi-Layer Compression Engine

The compression engine 238 includes any logic, business rules, functionor operations for compressing one or more protocols of a network packet,such as any of the protocols used by the network stack 267 of theappliance 200. The compression engine 238 may also be referred to as amulti-protocol compression engine 238 in that it may be designed,constructed or capable of compressing a plurality of protocols. In oneembodiment, the compression engine 238 applies context insensitivecompression, which is compression applied to data without knowledge ofthe type of data. In another embodiment, the compression engine 238applies context-sensitive compression. In this embodiment, thecompression engine 238 utilizes knowledge of the data type to select aspecific compression algorithm from a suite of suitable algorithms. Insome embodiments, knowledge of the specific protocol is used to performcontext-sensitive compression. In one embodiment, the appliance 200 orcompression engine 238 can use port numbers (e.g., well-known ports), aswell as data from the connection itself to determine the appropriatecompression algorithm to use. Some protocols use only a single type ofdata, requiring only a single compression algorithm that can be selectedwhen the connection is established. Other protocols contain differenttypes of data at different times. For example, POP, IMAP, SMTP, and HTTPall move files of arbitrary types interspersed with other protocol data.

In one embodiment, the compression engine 238 uses a delta-typecompression algorithm. In another embodiment, the compression engine 238uses first site compression as well as searching for repeated patternsamong data stored in cache, memory or disk. In some embodiments, thecompression engine 238 uses a lossless compression algorithm. In otherembodiments, the compression engine uses a lossy compression algorithm.In some cases, knowledge of the data type and, sometimes, permissionfrom the user are required to use a lossy compression algorithm. In someembodiments, compression is not limited to the protocol payload. Thecontrol fields of the protocol itself may be compressed. In someembodiments, the compression engine 238 uses a different algorithm forcontrol fields than that used for the payload.

In some embodiments, the compression engine 238 compresses at one ormore layers of the network stack 267. In one embodiment, the compressionengine 238 compresses at a transport layer protocol. In anotherembodiment, the compression engine 238 compresses at an applicationlayer protocol. In some embodiments, the compression engine 238compresses at a layer 2-4 protocol. In other embodiments, thecompression engine 238 compresses at a layer 5-7 protocol. In yetanother embodiment, the compression engine compresses a transport layerprotocol and an application layer protocol. In some embodiments, thecompression engine 238 compresses a layer 2-4 protocol and a layer 5-7protocol.

In some embodiments, the compression engine 238 uses memory-basedcompression, cache-based compression or disk-based compression or anycombination thereof. As such, the compression engine 238 may be referredto as a multi-layer compression engine. In one embodiment, thecompression engine 238 uses a history of data stored in memory, such asRAM. In another embodiment, the compression engine 238 uses a history ofdata stored in a cache, such as L2 cache of the processor. In otherembodiments, the compression engine 238 uses a history of data stored toa disk or storage location. In some embodiments, the compression engine238 uses a hierarchy of cache-based, memory-based and disk-based datahistory. The compression engine 238 may first use the cache-based datato determine one or more data matches for compression, and then maycheck the memory-based data to determine one or more data matches forcompression. In another case, the compression engine 238 may check diskstorage for data matches for compression after checking either thecache-based and/or memory-based data history.

In one embodiment, multi-protocol compression engine 238 compressesbi-directionally between clients 102 a-102 n and servers 106 a-106 n anyTCP/IP based protocol, including Messaging Application ProgrammingInterface (MAPI) (email), File Transfer Protocol (FTP), HyperTextTransfer Protocol (HTTP), Common Internet File System (CIFS) protocol(file transfer), Independent Computing Architecture (ICA) protocol,Remote Desktop Protocol (RDP), Wireless Application Protocol (WAP),Mobile IP protocol, and Voice Over IP (VoIP) protocol. In otherembodiments, multi-protocol compression engine 238 provides compressionof HyperText Markup Language (HTML) based protocols and in someembodiments, provides compression of any markup languages, such as theExtensible Markup Language (XML). In one embodiment, the multi-protocolcompression engine 238 provides compression of any high-performanceprotocol, such as any protocol designed for appliance 200 to appliance200 communications. In another embodiment, the multi-protocolcompression engine 238 compresses any payload of or any communicationusing a modified transport control protocol, such as Transaction TCP(T/TCP), TCP with selection acknowledgements (TCP-SACK), TCP with largewindows (TCP-LW), a congestion prediction protocol such as the TCP-Vegasprotocol, and a TCP spoofing protocol.

As such, the multi-protocol compression engine 238 may accelerateperformance for users accessing applications via desktop clients, e.g.,Microsoft Outlook and non-Web thin clients, such as any client launchedby popular enterprise applications like Oracle, SAP and Siebel, and evenmobile clients, such as the Pocket PC. In some embodiments, themulti-protocol compression engine by integrating with packet processingengine 240 accessing the network stack 267 is able to compress any ofthe protocols carried by a transport layer protocol, such as anyapplication layer protocol.

LAN/WAN Detector

The LAN/WAN detector 238 includes any logic, business rules, function oroperations for automatically detecting a slow side connection (e.g., awide area network (WAN) connection such as an Intranet) and associatedport 267, and a fast side connection (e.g., a local area network (LAN)connection) and an associated port 267. In some embodiments, the LAN/WANdetector 238 monitors network traffic on the network ports 267 of theappliance 200 to detect a synchronization packet, sometimes referred toas a “tagged” network packet. The synchronization packet identifies atype or speed of the network traffic. In one embodiment, thesynchronization packet identifies a WAN speed or WAN type connection.The LAN/WAN detector 238 also identifies receipt of an acknowledgementpacket to a tagged synchronization packet and on which port it isreceived. The appliance 200 then configures itself to operate theidentified port on which the tagged synchronization packet arrived sothat the speed on that port is set to be the speed associated with thenetwork connected to that port. The other port is then set to the speedassociated with the network connected to that port.

For ease of discussion herein, reference to “slow” side will be madewith respect to connection with a wide area network (WAN), e.g., theInternet, and operating at a network speed of the WAN. Likewise,reference to “fast” side will be made with respect to connection with alocal area network (LAN) and operating at a network speed the LAN.However, it is noted that “fast” and “slow” sides in a network canchange on a per-connection basis and are relative terms to the speed ofthe network connections or to the type of network topology. Suchconfigurations are useful in complex network topologies, where a networkis “fast” or “slow” only when compared to adjacent networks and not inany absolute sense.

In one embodiment, the LAN/WAN detector 238 may be used to allow forauto-discovery by an appliance 200 of a network to which it connects. Inanother embodiment, the LAN/WAN detector 238 may be used to detect theexistence or presence of a second appliance 200′ deployed in the network104. For example, an auto-discovery mechanism in operation in accordancewith FIG. 1A functions as follows: appliance 200 and 200′ are placed inline with the connection linking client 102 and server 106. Theappliances 200 and 200′ are at the ends of a low-speed link, e.g.,Internet, connecting two LANs. In one example embodiment, appliances 200and 200′ each include two ports—one to connect with the “lower” speedlink and the other to connect with a “higher” speed link, e.g., a LAN.Any packet arriving at one port is copied to the other port. Thus,appliance 200 and 200′ are each configured to function as a bridgebetween the two networks 104.

When an end node, such as the client 102, opens a new TCP connectionwith another end node, such as the server 106, the client 102 sends aTCP packet with a synchronization (SYN) header bit set, or a SYN packet,to the server 106. In the present example, client 102 opens a transportlayer connection to server 106. When the SYN packet passes throughappliance 200, the appliance 200 inserts, attaches or otherwise providesa characteristic TCP header option to the packet, which announces itspresence. If the packet passes through a second appliance, in thisexample appliance 200′ the second appliance notes the header option onthe SYN packet. The server 106 responds to the SYN packet with asynchronization acknowledgment (SYN-ACK) packet. When the SYN-ACK packetpasses through appliance 200′, a TCP header option is tagged (e.g.,attached, inserted or added) to the SYN-ACK packet to announce appliance200′ presence to appliance 200. When appliance 200 receives this packet,both appliances 200, 200′ are now aware of each other and the connectioncan be appropriately accelerated.

Further to the operations of the LAN/WAN detector 238, a method orprocess for detecting “fast” and “slow” sides of a network using a SYNpacket is described. During a transport layer connection establishmentbetween a client 102 and a server 106, the appliance 200 via the LAN/WANdetector 238 determines whether the SYN packet is tagged with anacknowledgement (ACK). If it is tagged, the appliance 200 identifies orconfigures the port receiving the tagged SYN packet (SYN-ACK) as the“slow” side. In one embodiment, the appliance 200 optionally removes theACK tag from the packet before copying the packet to the other port. Ifthe LAN/WAN detector 238 determines that the packet is not tagged, theappliance 200 identifies or configure the port receiving the untaggedpacket as the “fast” side. The appliance 200 then tags the SYN packetwith an ACK and copies the packet to the other port.

In another embodiment, the LAN/WAN detector 238 detects fast and slowsides of a network using a SYN-ACK packet. The appliance 200 via theLAN/WAN detector 238 determines whether the SYN-ACK packet is taggedwith an acknowledgement (ACK). If it is tagged, the appliance 200identifies or configures the port receiving the tagged SYN packet(SYN-ACK) as the “slow” side. In one embodiment, the appliance 200optionally removes the ACK tag from the packet before copying the packetto the other port. If the LAN/WAN detector 238 determines that thepacket is not tagged, the appliance 200 identifies or configures theport receiving the untagged packet as the “fast” side. The LAN/WANdetector 238 determines whether the SYN packet was tagged. If the SYNpacket was not tagged, the appliance 200 copied the packet to the otherport. If the SYN packet was tagged, the appliance tags the SYN-ACKpacket before copying it to the other port.

The appliance 200, 200′ may add, insert, modify, attach or otherwiseprovide any information or data in the TCP option header to provide anyinformation, data or characteristics about the network connection,network traffic flow, or the configuration or operation of the appliance200. In this manner, not only does an appliance 200 announce itspresence to another appliance 200′ or tag a higher or lower speedconnection, the appliance 200 provides additional information and datavia the TCP option headers about the appliance or the connection. TheTCP option header information may be useful to or used by an appliancein controlling, managing, optimizing, acceleration or improving thenetwork traffic flow traversing the appliance 200, or to otherwiseconfigure itself or operation of a network port.

Although generally described in conjunction with detecting speeds ofnetwork connections or the presence of appliances, the LAN/WAN detector238 can be used for applying any type of function, logic or operation ofthe appliance 200 to a port, connection or flow of network traffic. Inparticular, automated assignment of ports can occur whenever a deviceperforms different functions on different ports, where the assignment ofa port to a task can be made during the unit's operation, and/or thenature of the network segment on each port is discoverable by theappliance 200.

Flow Control

The flow controller 220 includes any logic, business rules, function oroperations for optimizing, accelerating or otherwise improving theperformance, operation or quality of service of transport layercommunications of network packets or the delivery of packets at thetransport layer. A flow controller, also sometimes referred to as a flowcontrol module, regulates, manages and controls data transfer rates. Insome embodiments, the flow controller 220 is deployed at or connected ata bandwidth bottleneck in the network 104. In one embodiment, the flowcontroller 220 effectively regulates, manages and controls bandwidthusage or utilization. In other embodiments, the flow control modules mayalso be deployed at points on the network of latency transitions (lowlatency to high latency) and on links with media losses (such aswireless or satellite links).

In some embodiments, a flow controller 220 may include a receiver-sideflow control module for controlling the rate of receipt of networktransmissions and a sender-side flow control module for the controllingthe rate of transmissions of network packets. In other embodiments, afirst flow controller 220 includes a receiver-side flow control moduleand a second flow controller 220′ includes a sender-side flow controlmodule. In some embodiments, a first flow controller 220 is deployed ona first appliance 200 and a second flow controller 220′ is deployed on asecond appliance 200′. As such, in some embodiments, a first appliance200 controls the flow of data on the receiver side and a secondappliance 200′ controls the data flow from the sender side. In yetanother embodiment, a single appliance 200 includes flow control forboth the receiver-side and sender-side of network communicationstraversing the appliance 200.

In one embodiment, a flow control module 220 is configured to allowbandwidth at the bottleneck to be more fully utilized, and in someembodiments, not overutilized. In some embodiments, the flow controlmodule 220 transparently buffers (or rebuffers data already buffered by,for example, the sender) network sessions that pass between nodes havingassociated flow control modules 220. When a session passes through twoor more flow control modules 220, one or more of the flow controlmodules controls a rate of the session(s).

In one embodiment, the flow control module 200 is configured withpredetermined data relating to bottleneck bandwidth. In anotherembodiment, the flow control module 220 may be configured to detect thebottleneck bandwidth or data associated therewith. A receiver-side flowcontrol module 220 may control the data transmission rate. Thereceiver-side flow control module controls 220 the sender-side flowcontrol module, e.g., 220, data transmission rate by forwardingtransmission rate limits to the sender-side flow control module 220. Inone embodiment, the receiver-side flow control module 220 piggybacksthese transmission rate limits on acknowledgement (ACK) packets (orsignals) sent to the sender, e.g., client 102, by the receiver, e.g.,server 106. The receiver-side flow control module 220 does this inresponse to rate control requests that are sent by the sender side flowcontrol module 220′. The requests from the sender-side flow controlmodule 220′ may be “piggybacked” on data packets sent by the sender 106.

In some embodiments, the flow controller 220 manipulates, adjusts,simulates, changes, improves or otherwise adapts the behavior of thetransport layer protocol to provide improved performance or operationsof delivery, data rates and/or bandwidth utilization of the transportlayer. The flow controller 220 may implement a plurality of data flowcontrol techniques at the transport layer, including but not limitedto 1) pre-acknowledgements, 2) window virtualization, 3) recongestiontechniques, 3) local retransmission techniques, 4) wavefront detectionand disambiguation, 5) transport control protocol selectiveacknowledgements, 6) transaction boundary detection techniques and 7)repacketization.

Although a sender may be generally described herein as a client 102 anda receiver as a server 106, a sender may be any end point such as aserver 106 or any computing device 100 on the network 104. Likewise, areceiver may be a client 102 or any other computing device on thenetwork 104.

Pre-Acknowledgements

In brief overview of a pre-acknowledgement flow control technique, theflow controller 220, in some embodiments, handles the acknowledgementsand retransmits for a sender, effectively terminating the sender'sconnection with the downstream portion of a network connection. Inreference to FIG. 1B, one possible deployment of an appliance 200 into anetwork architecture to implement this feature is depicted. In thisexample environment, a sending computer or client 102 transmits data onnetwork 104, for example, via a switch, which determines that the datais destined for VPN appliance 205. Because of the chosen networktopology, all data destined for VPN appliance 205 traverses appliance200, so the appliance 200 can apply any necessary algorithms to thisdata.

Continuing further with the example, the client 102 transmits a packet,which is received by the appliance 200. When the appliance 200 receivesthe packet, which is transmitted from the client 102 to a recipient viathe VPN appliance 205, the appliance 200 retains a copy of the packetand forwards the packet downstream to the VPN appliance 205. Theappliance 200 then generates an acknowledgement packet (ACK) and sendsthe ACK packet back to the client 102 or sending endpoint. This ACK, apre-acknowledgment, causes the sender 102 to believe that the packet hasbeen delivered successfully, freeing the sender's resources forsubsequent processing. The appliance 200 retains the copy of the packetdata in the event that a retransmission of the packet is required, sothat the sender 102 does not have to handle retransmissions of the data.This early generation of acknowledgements may be called “preacking.”

If a retransmission of the packet is required, the appliance 200retransmits the packet to the sender. The appliance 200 may determinewhether retransmission is required as a sender would in a traditionalsystem, for example, determining that a packet is lost if anacknowledgement has not been received for the packet after apredetermined amount of time. To this end, the appliance 200 monitorsacknowledgements generated by the receiving endpoint, e.g., server 106(or any other downstream network entity) so that it can determinewhether the packet has been successfully delivered or needs to beretransmitted. If the appliance 200 determines that the packet has beensuccessfully delivered, the appliance 200 is free to discard the savedpacket data. The appliance 200 may also inhibit forwardingacknowledgements for packets that have already been received by thesending endpoint.

In the embodiment described above, the appliance 200 via the flowcontroller 220 controls the sender 102 through the delivery ofpre-acknowledgements, also referred to as “preacks”, as though theappliance 200 was a receiving endpoint itself. Since the appliance 200is not an endpoint and does not actually consume the data, the appliance200 includes a mechanism for providing overflow control to the sendingendpoint. Without overflow control, the appliance 200 could run out ofmemory because the appliance 200 stores packets that have been preackedto the sending endpoint but not yet acknowledged as received by thereceiving endpoint. Therefore, in a situation in which the sender 102transmits packets to the appliance 200 faster than the appliance 200 canforward the packets downstream, the memory available in the appliance200 to store unacknowledged packet data can quickly fill. A mechanismfor overflow control allows the appliance 200 to control transmission ofthe packets from the sender 102 to avoid this problem.

In one embodiment, the appliance 200 or flow controller 220 includes aninherent “self-clocking” overflow control mechanism. This self-clockingis due to the order in which the appliance 200 may be designed totransmit packets downstream and send ACKs to the sender 102 or 106. Insome embodiments, the appliance 200 does not preack the packet untilafter it transmits the packet downstream. In this way, the sender 102will receive the ACKs at the rate at which the appliance 200 is able totransmit packets rather than the rate at which the appliance 200receives packets from the sender 100. This helps to regulate thetransmission of packets from a sender 102.

Window Virtualization

Another overflow control mechanism that the appliance 200 may implementis to use the TCP window size parameter, which tells a sender how muchbuffer the receiver is permitting the sender to fill up. A nonzerowindow size (e.g., a size of at least one Maximum Segment Size (MSS)) ina preack permits the sending endpoint to continue to deliver data to theappliance, whereas a zero window size inhibits further datatransmission. Accordingly, the appliance 200 may regulate the flow ofpackets from the sender, for example when the appliance's 200 buffer isbecoming full, by appropriately setting the TCP window size in eachpreack.

Another technique to reduce this additional overhead is to applyhysteresis. When the appliance 200 delivers data to the slower side, theoverflow control mechanism in the appliance 200 can require that aminimum amount of space be available before sending a nonzero windowadvertisement to the sender. In one embodiment, the appliance 200 waitsuntil there is a minimum of a predetermined number of packets, such asfour packets, of space available before sending a nonzero window packet,such as a packet indicating a window size of four packets. This mayreduce the overhead by approximately a factor of four, since only twoACK packets are sent for each group of four data packets, instead ofeight ACK packets for four data packets.

Another technique the appliance 200 or flow controller 220 may use foroverflow control is the TCP delayed ACK mechanism, which skips ACKs toreduce network traffic. The TCP delayed ACKs automatically delay thesending of an ACK, either until two packets are received or until afixed timeout has occurred. This mechanism alone can result in cuttingthe overhead in half; moreover, by increasing the numbers of packetsabove two, additional overhead reduction is realized. But merelydelaying the ACK itself may be insufficient to control overflow, and theappliance 200 may also use the advertised window mechanism on the ACKsto control the sender. When doing this, the appliance 200 in oneembodiment avoids triggering the timeout mechanism of the sender bydelaying the ACK too long.

In one embodiment, the flow controller 220 does not preack the lastpacket of a group of packets. By not preacking the last packet, or atleast one of the packets in the group, the appliance avoids a falseacknowledgement for a group of packets. For example, if the appliancewere to send a preack for a last packet and the packet were subsequentlylost, the sender would have been tricked into thinking that the packetis delivered when it was not. Thinking that the packet had beendelivered, the sender could discard that data. If the appliance alsolost the packet, there would be no way to retransmit the packet to therecipient. By not preacking the last packet of a group of packets, thesender will not discard the packet until it has been delivered.

In another embodiment, the flow controller 220 may use a windowvirtualization technique to control the rate of flow or bandwidthutilization of a network connection. Though it may not immediately beapparent from examining conventional literature such as RFC 1323, thereis effectively a send window for transport layer protocols such as TCP.The send window is similar to the receive window, in that it consumesbuffer space (though on the sender). The sender's send window consistsof all data sent by the application that has not been acknowledged bythe receiver. This data must be retained in memory in caseretransmission is required. Since memory is a shared resource, some TCPstack implementations limit the size of this data. When the send windowis full, an attempt by an application program to send more data resultsin blocking the application program until space is available. Subsequentreception of acknowledgements will free send-window memory and unblockthe application program. This window size is known as the socket buffersize in some TCP implementations.

In one embodiment, the flow control module 220 is configured to provideaccess to increased window (or buffer) sizes. This configuration mayalso be referenced to as window virtualization. In an embodimentincluding TCP as the transport layer protocol, the TCP header mayinclude a bit string corresponding to a window scale. In one embodiment,“window” may be referenced in a context of send, receive, or both.

One embodiment of window virtualization is to insert a preackingappliance 200 into a TCP session. In reference to any of theenvironments of FIG. 1A or 1B, initiation of a data communicationsession between a source node, e.g., client 102 (for ease of discussion,now referenced as source node 102), and a destination node, e.g., server106 (for ease of discussion, now referenced as destination node 106) isestablished. For TCP communications, the source node 102 initiallytransmits a synchronization signal (“SYN”) through its local areanetwork 104 to first flow control module 220. The first flow controlmodule 220 inserts a configuration identifier into the TCP headeroptions area. The configuration identifier identifies this point in thedata path as a flow control module.

The appliances 200 via a flow control module 220 provide window (orbuffer) to allow increasing data buffering capabilities within a sessiondespite having end nodes with small buffer sizes, e.g., typically 16 kbytes. However, RFC 1323 requires window scaling for any buffer sizesgreater than 64 k bytes, which must be set at the time of sessioninitialization (SYN, SYN-ACK signals). Moreover, the window scalingcorresponds to the lowest common denominator in the data path, often anend node with small buffer size. This window scale often is a scale of 0or 1, which corresponds to a buffer size of up to 64 k or 128 k bytes.Note that because the window size is defined as the window field in eachpacket shifted over by the window scale, the window scale establishes anupper limit for the buffer, but does not guarantee the buffer isactually that large. Each packet indicates the current available bufferspace at the receiver in the window field.

In one embodiment of scaling using the window virtualization technique,during connection establishment (i.e., initialization of a session) whenthe first flow control module 220 receives from the source node 102 theSYN signal (or packet), the flow control module 220 stores the windowsscale of the source node 102 (which is the previous node) or stores a 0for window scale if the scale of the previous node is missing. The firstflow control module 220 also modifies the scale, e.g., increases thescale to 4 from 0 or 1, in the SYN-FCM signal. When the second flowcontrol module 220 receives the SYN signal, it stores the increasedscale from the first flow control signal and resets the scale in the SYNsignal back to the source node 103 scale value for transmission to thedestination node 106. When the second flow controller 220 receives theSYN-ACK signal from the destination node 106, it stores the scale fromthe destination node 106 scale, e.g., 0 or 1, and modifies it to anincreased scale that is sent with the SYN-ACK-FCM signal. The first flowcontrol node 220 receives and notes the received window scale andrevises the windows scale sent back to the source node 102 back down tothe original scale, e.g., 0 or 1. Based on the above window shiftconversation during connection establishment, the window field in everysubsequent packet, e.g., TCP packet, of the session must be shiftedaccording to the window shift conversion.

The window scale, as described above, expresses buffer sizes of over 64k and may not be required for window virtualization. Thus, shifts forwindow scale may be used to express increased buffer capacity in eachflow control module 220. This increase in buffer capacity in may bereferenced as window (or buffer) virtualization. The increase in buffersize allows greater packet throughput from and to the respective endnodes 102 and 106. Note that buffer sizes in TCP are typically expressedin terms of bytes, but for ease of discussion “packets” may be used inthe description herein as it relates to virtualization.

By way of example, a window (or buffer) virtualization performed by theflow controller 220 is described. In this example, the source node 102and the destination node 106 are configured similar to conventional endnodes having a limited buffer capacity of 16 k bytes, which equalsapproximately 10 packets of data. Typically, an end node 102, 106 mustwait until the packet is transmitted and confirmation is received beforea next group of packets can be transmitted. In one embodiment, usingincreased buffer capacity in the flow control modules 220, when thesource node 103 transmits its data packets, the first flow controlmodule 220 receives the packets, stores it in its larger capacitybuffer, e.g., 512 packet capacity, and immediately sends back anacknowledgement signal indicating receipt of the packets (“REC-ACK”)back to the source node 102. The source node 102 can then “flush” itscurrent buffer, load the buffer with 10 new data packets, and transmitthose onto the first flow control module 220. Again, the first flowcontrol module 220 transmits a REC-ACK signal back to the source node102 and the source node 102 flushes its buffer and loads it with 10 morenew packets for transmission.

As the first flow control module 220 receives the data packets from thesource nodes, it loads up its buffer accordingly. When it is ready thefirst flow control module 220 can begin transmitting the data packets tothe second flow control module 230, which also has an increased buffersize, for example, to receive 512 packets. The second flow controlmodule 220′ receives the data packets and begins to transmit 10 packetsat a time to the destination node 106. Each REC-ACK received at thesecond flow control node 220 from the destination node 106 results in 10more packets being transmitted to the destination node 106 until all thedata packets are transferred. Hence, the present invention is able toincrease data transmission throughput between the source node (sender)102 and the destination node (receiver) 106 by taking advantage of thelarger buffer in the flow control modules 220, 220′ between the devices.

It is noted that by “preacking” the transmission of data as describedpreviously, a sender (or source node 102) is allowed to transmit moredata than is possible without the preacks, thus affecting a largerwindow size. For example, in one embodiment this technique is effectivewhen the flow control module 220, 220′ is located “near” a node (e.g.,source node 102 or destination node 106) that lacks large windows.

Recongestion

Another technique or algorithm of the flow controller 220 is referred toas recongestion. The standard TCP congestion avoidance algorithms areknown to perform poorly in the face of certain network conditions,including: large RTTs (round trip times), high packet loss rates, andothers. When the appliance 200 detects a congestion condition such aslong round trip times or high packet loss, the appliance 200 intervenes,substituting an alternate congestion avoidance algorithm that bettersuits the particular network condition. In one embodiment, therecongestion algorithm uses preacks to effectively terminate theconnection between the sender and the receiver. The appliance 200 thenresends the packets from itself to the receiver, using a differentcongestion avoidance algorithm. Recongestion algorithms may be dependenton the characteristics of the TCP connection. The appliance 200 monitorseach TCP connection, characterizing it with respect to the differentdimensions, selecting a recongestion algorithm that is appropriate forthe current characterization.

In one embodiment, upon detecting a TCP connection that is limited byround trip times (RTT), a recongestion algorithm is applied whichbehaves as multiple TCP connections. Each TCP connection operates withinits own performance limit but the aggregate bandwidth achieves a higherperformance level. One parameter in this mechanism is the number ofparallel connections that are applied (N). Too large a value of N andthe connection bundle achieves more than its fair share of bandwidth.Too small a value of N and the connection bundle achieves less than itsfair share of bandwidth. One method of establishing “N” relies on theappliance 200 monitoring the packet loss rate, RTT, and packet size ofthe actual connection. These numbers are plugged into a TCP responsecurve formula to provide an upper limit on the performance of a singleTCP connection in the present configuration. If each connection withinthe connection bundle is achieving substantially the same performance asthat computed to be the upper limit, then additional parallelconnections are applied. If the current bundle is achieving lessperformance than the upper limit, the number of parallel connections isreduced. In this manner, the overall fairness of the system ismaintained since individual connection bundles contain no moreparallelism than is required to eliminate the restrictions imposed bythe protocol itself. Furthermore, each individual connection retains TCPcompliance.

Another method of establishing “N” is to utilize a parallel flow controlalgorithm such as the TCP “Vegas” algorithm or the TCP “StabilizedVegas” algorithm. In this method, the network information associatedwith the connections in the connection bundle (e.g., RTT, loss rate,average packet size, etc.) is aggregated and applied to the alternateflow control algorithm. The results of this algorithm are in turndistributed among the connections of the bundle controlling their number(i.e., N). Optionally, each connection within the bundle continues usingthe standard TCP congestion avoidance algorithm.

In another embodiment, the individual connections within a parallelbundle are virtualized, i.e., actual individual TCP connections are notestablished. Instead the congestion avoidance algorithm is modified tobehave as though there were N parallel connections. This method has theadvantage of appearing to transiting network nodes as a singleconnection. Thus the QOS, security and other monitoring methods of thesenodes are unaffected by the recongestion algorithm. In yet anotherembodiment, the individual connections within a parallel bundle arereal, i.e., a separate. TCP connection is established for each of theparallel connections within a bundle. The congestion avoidance algorithmfor each TCP connection need not be modified.

Retransmission

In some embodiments, the flow controller 220 may apply a localretransmission technique. One reason for implementing preacks is toprepare to transit to a high-loss link (e.g., wireless). In theseembodiments, the preacking appliance 200 or flow control module 220 islocated most beneficially “before” the wireless link. This allowsretransmissions to be performed closer to the high loss link, removingthe retransmission burden from the remainder of the network. Theappliance 200 may provide local retransmission, in which case, packetsdropped due to failures of the link are retransmitted directly by theappliance 200. This is advantageous because it eliminates theretransmission burden upon an end node, such as server 106, andinfrastructure of any of the networks 104. With appliance 200 providinglocal retransmissions, the dropped packet can be retransmitted acrossthe high loss link without necessitating a retransmit by an end node anda corresponding decrease in the rate of data transmission from the endnode.

Another reason for implementing preacks is to avoid a receive time out(RTO) penalty. In standard TCP there are many situations that result inan RTO, even though a large percentage of the packets in flight weresuccessfully received. With standard TCP algorithms, dropping more thanone packet within an RTT window would likely result in a timeout.Additionally, most TCP connections experience a timeout if aretransmitted packet is dropped. In a network with a high bandwidthdelay product, even a relatively small packet loss rate will causefrequent Retransmission timeouts (RTOs). In one embodiment, theappliance 200 uses a retransmit and timeout algorithm is avoid prematureRTOs. The appliance 200 or flow controller 220 maintains a count ofretransmissions is maintained on a per-packet basis. Each time that apacket is retransmitted, the count is incremented by one and theappliance 200 continues to transmit packets. In some embodiments, onlyif a packet has been retransmitted a predetermined number of times is anRTO declared.

Wavefront Detection and Disambiguation

In some embodiments, the appliance 200 or flow controller 220 useswavefront detection and disambiguation techniques in managing andcontrolling flow of network traffic. In this technique, the flowcontroller 220 uses transmit identifiers or numbers to determine whetherparticular data packets need to be retransmitted. By way of example, asender transmits data packets over a network, where each instance of atransmitted data packet is associated with a transmit number. It can beappreciated that the transmit number for a packet is not the same as thepacket's sequence number, since a sequence number references the data inthe packet while the transmit number references an instance of atransmission of that data. The transmit number can be any informationusable for this purpose, including a timestamp associated with a packetor simply an increasing number (similar to a sequence number or a packetnumber). Because a data segment may be retransmitted, different transmitnumbers may be associated with a particular sequence number.

As the sender transmits data packets, the sender maintains a datastructure of acknowledged instances of data packet transmissions. Eachinstance of a data packet transmission is referenced by its sequencenumber and transmit number. By maintaining a transmit number for eachpacket, the sender retains the ordering of the transmission of datapackets. When the sender receives an ACK or a SACK, the senderdetermines the highest transmit number associated with packets that thereceiver indicated has arrived (in the received acknowledgement). Anyoutstanding unacknowledged packets with lower transmit numbers arepresumed lost.

In some embodiments, the sender is presented with an ambiguous situationwhen the arriving packet has been retransmitted: a standard ACK/SACKdoes not contain enough information to allow the sender to determinewhich transmission of the arriving packet has triggered theacknowledgement. After receiving an ambiguous acknowledgement,therefore, the sender disambiguates the acknowledgement to associate itwith a transmit number. In various embodiments, one or a combination ofseveral techniques may be used to resolve this ambiguity.

In one embodiment, the sender includes an identifier with a transmitteddata packet, and the receiver returns that identifier or a functionthereof with the acknowledgement. The identifier may be a timestamp(e.g., a TCP timestamp as described in RFC 1323), a sequential number,or any other information that can be used to resolve between two or moreinstances of a packet's transmission. In an embodiment in which the TCPtimestamp option is used to disambiguate the acknowledgement, eachpacket is tagged with up to 32-bits of unique information. Upon receiptof the data packet, the receiver echoes this unique information back tothe sender with the acknowledgement. The sender ensures that theoriginally sent packet and its retransmitted version or versions containdifferent values for the timestamp option, allowing it to unambiguouslyeliminate the ACK ambiguity. The sender may maintain this uniqueinformation, for example, in the data structure in which it stores thestatus of sent data packets. This technique is advantageous because itcomplies with industry standards and is thus likely to encounter littleor no interoperability issues. However, this technique may require tenbytes of TCP header space in some implementations, reducing theeffective throughput rate on the network and reducing space availablefor other TCP options.

In another embodiment, another field in the packet, such as the IP IDfield, is used to disambiguate in a way similar to the TCP timestampoption described above. The sender arranges for the ID field values ofthe original and the retransmitted version or versions of the packet tohave different ID fields in the IP header. Upon reception of the datapacket at the receiver, or a proxy device thereof, the receiver sets theID field of the ACK packet to a function of the ID field of the packetthat triggers the ACK. This method is advantageous, as it requires noadditional data to be sent, preserving the efficiency of the network andTCP header space. The function chosen should provide a high degree oflikelihood of providing disambiguation. In a preferred embodiment, thesender selects IP ID values with the most significant bit set to 0. Whenthe receiver responds, the IP ID value is set to the same IP ID valuewith the most significant bit set to a one.

In another embodiment, the transmit numbers associated withnon-ambiguous acknowledgements are used to disambiguate an ambiguousacknowledgement. This technique is based on the principle thatacknowledgements for two packets will tend to be received closer in timeas the packets are transmitted closer in time. Packets that are notretransmitted will not result in ambiguity, as the acknowledgementsreceived for such packets can be readily associated with a transmitnumber. Therefore, these known transmit numbers are compared to thepossible transmit numbers for an ambiguous acknowledgement received nearin time to the known acknowledgement. The sender compares the transmitnumbers of the ambiguous acknowledgement against the last known receivedtransmit number, selecting the one closest to the known receivedtransmit number. For example, if an acknowledgement for data packet 1 isreceived and the last received acknowledgement was for data packet 5,the sender resolves the ambiguity by assuming that the third instance ofdata packet 1 caused the acknowledgement.

Selective Acknowledgements

Another technique of the appliance 200 or flow controller 220 is toimplement an embodiment of transport control protocol selectiveacknowledgements, or TCP SACK, to determine what packets have or havenot been received. This technique allows the sender to determineunambiguously a list of packets that have been received by the receiveras well as an accurate list of packets not received. This functionalitymay be implemented by modifying the sender and/or receiver, or byinserting sender- and receiver-side flow control modules 220 in thenetwork path between the sender and receiver. In reference to FIG. 1A orFIG. 1B, a sender, e.g., client 102, is configured to transmit datapackets to the receiver, e.g., server 106, over the network 104. Inresponse, the receiver returns a TCP Selective Acknowledgment option,referred to as SACK packet to the sender. In one embodiment, thecommunication is bi-directional, although only one direction ofcommunication is discussed here for simplicity. The receiver maintains alist, or other suitable data structure, that contains a group of rangesof sequence numbers for data packets that the receiver has actuallyreceived. In some embodiments, the list is sorted by sequence number inan ascending or descending order. The receiver also maintains a left-offpointer, which comprises a reference into the list and indicates theleft-off point from the previously generated SACK packet.

Upon reception of a data packet, the receiver generates and transmits aSACK packet back to the sender. In some embodiments, the SACK packetincludes a number of fields, each of which can hold a range of sequencenumbers to indicate a set of received data packets. The receiver fillsthis first field of the SACK packet with a range of sequence numbersthat includes the landing packet that triggered the SACK packet. Theremaining available SACK fields are filled with ranges of sequencenumbers from the list of received packets. As there are more ranges inthe list than can be loaded into the SACK packet, the receiver uses theleft-off pointer to determine which ranges are loaded into the SACKpacket. The receiver inserts the SACK ranges consecutively from thesorted list, starting from the range referenced by the pointer andcontinuing down the list until the available SACK range space in the TCPheader of the SACK packet is consumed. The receiver wraps around to thestart of the list if it reaches the end. In some embodiments, two orthree additional SACK ranges can be added to the SACK range information.

Once the receiver generates the SACK packet, the receiver sends theacknowledgement back to the sender. The receiver then advances theleft-off pointer by one or more SACK range entries in the list. If thereceiver inserts four SACK ranges, for example, the left-off pointer maybe advanced two SACK ranges in the list. When the advanced left-offpointer reaches at the end of the list, the pointer is reset to thestart of the list, effectively wrapping around the list of knownreceived ranges. Wrapping around the list enables the system to performwell, even in the presence of large losses of SACK packets, since theSACK information that is not communicated due to a lost SACK packet willeventually be communicated once the list is wrapped around.

It can be appreciated, therefore, that a SACK packet may communicateseveral details about the condition of the receiver. First, the SACKpacket indicates that, upon generation of the SACK packet, the receiverhad just received a data packet that is within the first field of theSACK information. Secondly, the second and subsequent fields of the SACKinformation indicate that the receiver has received the data packetswithin those ranges. The SACK information also implies that the receiverhad not, at the time of the SACK packet's generation, received any ofthe data packets that fall between the second and subsequent fields ofthe SACK information. In essence, the ranges between the second andsubsequent ranges in the SACK information are “holes” in the receiveddata, the data therein known not to have been delivered. Using thismethod, therefore, when a SACK packet has sufficient space to includemore than two SACK ranges, the receiver may indicate to the sender arange of data packets that have not yet been received by the receiver.

In another embodiment, the sender uses the SACK packet described abovein combination with the retransmit technique described above to makeassumptions about which data packets have been delivered to thereceiver. For example, when the retransmit algorithm (using the transmitnumbers) declares a packet lost, the sender considers the packet to beonly conditionally lost, as it is possible that the SACK packetidentifying the reception of this packet was lost rather than the datapacket itself. The sender thus adds this packet to a list of potentiallylost packets, called the presumed lost list. Each time a SACK packetarrives, the known missing ranges of data from the SACK packet arecompared to the packets in the presumed lost list. Packets that containdata known to be missing are declared actually lost and are subsequentlyretransmitted. In this way, the two schemes are combined to give thesender better information about which packets have been lost and need tobe retransmitted.

Transaction Boundary Detection

In some embodiments, the appliance 200 or flow controller 220 applies atechnique referred to as transaction boundary detection. In oneembodiment, the technique pertains to ping-pong behaved connections. Atthe TCP layer, ping-pong behavior is when one communicant—a sender—sendsdata and then waits for a response from the other communicant—thereceiver. Examples of ping-pong behavior include remote procedure call,HTTP and others. The algorithms described above use retransmissiontimeout (RTO) to recover from the dropping of the last packet or packetsassociated with the transaction. Since the TCP RTO mechanism isextremely coarse in some embodiments, for example requiring a minimumone second value in all cases), poor application behavior may be seen inthese situations.

In one embodiment, the sender of data or a flow control module 220coupled to the sender detects a transaction boundary in the data beingsent. Upon detecting a transaction boundary, the sender or a flowcontrol module 220 sends additional packets, whose reception generatesadditional ACK or SACK responses from the receiver. Insertion of theadditional packets is preferably limited to balance between improvedapplication response time and network capacity utilization. The numberof additional packets that is inserted may be selected according to thecurrent loss rate associated with that connection, with more packetsselected for connections having a higher loss rate.

One method of detecting a transaction boundary is time based. If thesender has been sending data and ceases, then after a period of time thesender or flow control module 200 declares a transaction boundary. Thismay be combined with other techniques. For example, the setting of thePSH (TCP Push) bit by the sender in the TCP header may indicate atransaction boundary. Accordingly, combining the time-based approachwith these additional heuristics can provide for more accurate detectionof a transaction boundary. In another technique, if the sender or flowcontrol module 220 understands the application protocol, it can parsethe protocol data stream and directly determine transaction boundaries.In some embodiment, this last behavior can be used independent of anytime-based mechanism.

Responsive to detecting a transaction boundary, the sender or flowcontrol module 220 transmits additional data packets to the receiver tocause acknowledgements therefrom. The additional data packets shouldtherefore be such that the receiver will at least generate an ACK orSACK in response to receiving the data packet. In one embodiment, thelast packet or packets of the transaction are simply retransmitted. Thishas the added benefit of retransmitting needed data if the last packetor packets had been dropped, as compared to merely sending dummy datapackets. In another embodiment, fractions of the last packet or packetsare sent, allowing the sender to disambiguate the arrival of thesepackets from their original packets. This allows the receiver to avoidfalsely confusing any reordering adaptation algorithms. In anotherembodiment, any of a number of well-known forward error correctiontechniques can be used to generate additional data for the insertedpackets, allowing for the reconstruction of dropped or otherwise missingdata at the receiver.

In some embodiments, the boundary detection technique described hereinhelps to avoid a timeout when the acknowledgements for the last datapackets in a transaction are dropped. When the sender or flow controlmodule 220 receives the acknowledgements for these additional datapackets, the sender can determine from these additional acknowledgementswhether the last data packets have been received or need to beretransmitted, thus avoiding a timeout. In one embodiment, if the lastpackets have been received but their acknowledgements were dropped, aflow control module 220 generates an acknowledgement for the datapackets and sends the acknowledgement to the sender, thus communicatingto the sender that the data packets have been delivered. In anotherembodiment, if the last packets have not been received, a flow controlmodule 200 sends a packet to the sender to cause the sender toretransmit the dropped data packets.

Repacketization

In yet another embodiment, the appliance 200 or flow controller 220applies a repacketization technique for improving the flow of transportlayer network traffic. In some embodiments, performance of TCP isproportional to packet size. Thus increasing packet sizes improvesperformance unless it causes substantially increased packet loss ratesor other nonlinear effects, like IP fragmentation. In general, wiredmedia (such as copper or fibre optics) have extremely low bit-errorrates, low enough that these can be ignored. For these media, it isadvantageous for the packet size to be the maximum possible beforefragmentation occurs (the maximum packet size is limited by theprotocols of the underlying transmission media). Whereas fortransmission media with higher loss rates (e.g., wireless technologiessuch as WiFi, etc., or high-loss environments such as power-linenetworking, etc.), increasing the packet size may lead to lowertransmission rates, as media-induced errors cause an entire packet to bedropped (i.e., media-induced errors beyond the capability of thestandard error correcting code for that media), increasing the packetloss rate. A sufficiently large increase in the packet loss rate willactually negate any performance benefit of increasing packet size. Insome cases, it may be difficult for a TCP endpoint to choose an optimalpacket size. For example, the optimal packet size may vary across thetransmission path, depending on the nature of each link.

By inserting an appliance 200 or flow control module 220 into thetransmission path, the flow controller 220 monitors characteristics ofthe link and repacketizes according to determined link characteristics.In one embodiment, an appliance 200 or flow controller 220 repacketizespackets with sequential data into a smaller number of larger packets. Inanother embodiment, an appliance 200 or flow controller 220 repacketizespackets by breaking part a sequence of large packets into a largernumber of smaller packets. In other embodiments, an appliance 200 orflow controller 220 monitors the link characteristics and adjusts thepacket sizes through recombination to improve throughput.

QoS

Still referring to FIG. 2A, the flow controller 220, in someembodiments, may include a QoS Engine 236, also referred to as a QoScontroller. In another embodiment, the appliance 200 and/or networkoptimization engine 250 includes the QoS engine 236, for example,separately but in communication with the flow controller 220. The QoSEngine 236 includes any logic, business rules, function or operationsfor performing one or more Quality of Service (QoS) techniques improvingthe performance, operation or quality of service of any of the networkconnections. In some embodiments, the QoS engine 236 includes networktraffic control and management mechanisms that provide differentpriorities to different users, applications, data flows or connections.In other embodiments, the QoS engine 236 controls, maintains, or assuresa certain level of performance to a user, application, data flow orconnection. In one embodiment, the QoS engine 236 controls, maintains orassures a certain portion of bandwidth or network capacity for a user,application, data flow or connection. In some embodiments, the QoSengine 236 monitors the achieved level of performance or the quality ofservice corresponding to a user, application, data flow or connection,for example, the data rate and delay. In response to monitoring, the QoSengine 236 dynamically controls or adjusts scheduling priorities ofnetwork packets to achieve the desired level of performance or qualityof service.

In some embodiments, the QoS engine 236 prioritizes, schedules andtransmits network packets according to one or more classes or levels ofservices. In some embodiments, the class or level service mayinclude: 1) best efforts, 2) controlled load, 3) guaranteed or 4)qualitative. For a best efforts class of service, the appliance 200makes reasonable effort to deliver packets (a standard service level).For a controlled load class of service, the appliance 200 or QoS engine236 approximates the standard packet error loss of the transmissionmedium or approximates the behavior of best-effort service in lightlyloaded network conditions. For a guaranteed class of service, theappliance 200 or QoS engine 236 guarantees the ability to transmit dataat a determined rate for the duration of the connection. For aqualitative class of service, the appliance 200 or QoS engine 236 thequalitative service class is used for applications, users, data flows orconnection that require or desire prioritized traffic but cannotquantify resource needs or level of service. In these cases, theappliance 200 or QoS engine 236 determines the class of service orprioritization based on any logic or configuration of the QoS engine 236or based on business rules or policies. For example, in one embodiment,the QoS engine 236 prioritizes, schedules and transmits network packetsaccording to one or more policies as specified by the policy engine 295,295′.

Protocol Acceleration

The protocol accelerator 234 includes any logic, business rules,function or operations for optimizing, accelerating, or otherwiseimproving the performance, operation or quality of service of one ormore protocols. In one embodiment, the protocol accelerator 234accelerates any application layer protocol or protocols at layers 5-7 ofthe network stack. In other embodiments, the protocol accelerator 234accelerates a transport layer or a layer 4 protocol. In one embodiment,the protocol accelerator 234 accelerates layer 2 or layer 3 protocols.In some embodiments, the protocol accelerator 234 is configured,constructed or designed to optimize or accelerate each of one or moreprotocols according to the type of data, characteristics and/or behaviorof the protocol. In another embodiment, the protocol accelerator 234 isconfigured, constructed or designed to improve a user experience,response times, network or computer load, and/or network or bandwidthutilization with respect to a protocol.

In one embodiment, the protocol accelerator 234 is configured,constructed or designed to minimize the effect of WAN latency on filesystem access. In some embodiments, the protocol accelerator 234optimizes or accelerates the use of the CIFS (Common Internet FileSystem) protocol to improve file system access times or access times todata and files. In some embodiments, the protocol accelerator 234optimizes or accelerates the use of the NFS (Network File System)protocol. In another embodiment, the protocol accelerator 234 optimizesor accelerates the use of the File Transfer protocol (FTP).

In one embodiment, the protocol accelerator 234 is configured,constructed or designed to optimize or accelerate a protocol carrying asa payload or using any type and form of markup language. In otherembodiments, the protocol accelerator 234 is configured, constructed ordesigned to optimize or accelerate a HyperText Transfer Protocol (HTTP).In another embodiment, the protocol accelerator 234 is configured,constructed or designed to optimize or accelerate a protocol carrying asa payload or otherwise using XML (eXtensible Markup Language).

Transparency and Multiple Deployment Configurations

In some embodiments, the appliance 200 and/or network optimizationengine 250 is transparent to any data flowing across a networkconnection or link, such as a WAN link. In one embodiment, the appliance200 and/or network optimization engine 250 operates in such a mannerthat the data flow across the WAN is recognizable by any networkmonitoring, QOS management or network analysis tools. In someembodiments, the appliance 200 and/or network optimization engine 250does not create any tunnels or streams for transmitting data that mayhide, obscure or otherwise make the network traffic not transparent. Inother embodiments, the appliance 200 operates transparently in that theappliance does not change any of the source and/or destination addressinformation or port information of a network packet, such as internetprotocol addresses or port numbers. In other embodiments, the appliance200 and/or network optimization engine 250 is considered to operate orbehave transparently to the network, an application, client, server orother appliances or computing device in the network infrastructure. Thatis, in some embodiments, the appliance is transparent in that networkrelated configuration of any device or appliance on the network does notneed to be modified to support the appliance 200.

The appliance 200 may be deployed in any of the following deploymentconfigurations: 1) in-line of traffic, 2) in proxy mode, or 3) in avirtual in-line mode. In some embodiments, the appliance 200 may bedeployed inline to one or more of the following: a router, a client, aserver or another network device or appliance. In other embodiments, theappliance 200 may be deployed in parallel to one or more of thefollowing: a router, a client, a server or another network device orappliance. In parallel deployments, a client, server, router or othernetwork appliance may be configured to forward, transfer or transitnetworks to or via the appliance 200.

In the embodiment of in-line, the appliance 200 is deployed inline witha WAN link of a router. In this way, all traffic from the WAN passesthrough the appliance before arriving at a destination of a LAN.

In the embodiment of a proxy mode, the appliance 200 is deployed as aproxy device between a client and a server. In some embodiments, theappliance 200 allows clients to make indirect connections to a resourceon a network. For example, a client connects to a resource via theappliance 200, and the appliance provides the resource either byconnecting to the resource, a different resource, or by serving theresource from a cache. In some cases, the appliance may alter theclient's request or the server's response for various purposes, such asfor any of the optimization techniques discussed herein. In oneembodiment, the client 102 send requests addressed to the proxy. In onecase, the proxy responds to the client in place of or acting as a server106. In other embodiments, the appliance 200 behaves as a transparentproxy, by intercepting and forwarding requests and responsestransparently to a client and/or server. Without client-sideconfiguration, the appliance 200 may redirect client requests todifferent servers or networks. In some embodiments, the appliance 200may perform any type and form of network address translation, referredto as NAT, on any network traffic traversing the appliance.

In some embodiments, the appliance 200 is deployed in a virtual in-linemode configuration. In this embodiment, a router or a network devicewith routing or switching functionality is configured to forward,reroute or otherwise provide network packets destined to a network tothe appliance 200. The appliance 200 then performs any desiredprocessing on the network packets, such as any of the WAN optimizationtechniques discussed herein. Upon completion of processing, theappliance 200 forwards the processed network packet to the router totransmit to the destination on the network. In this way, the appliance200 can be coupled to the router in parallel but still operate as it ifthe appliance 200 were inline. This deployment mode also providestransparency in that the source and destination addresses and portinformation are preserved as the packet is processed and transmitted viathe appliance through the network.

End Node Deployment

Although the network optimization engine 250 is generally describedabove in conjunction with an appliance 200, the network optimizationengine 250, or any portion thereof, may be deployed, distributed orotherwise operated on any end node, such as a client 102 and/or server106. As such, a client or server may provide any of the systems andmethods of the network optimization engine 250 described herein inconjunction with one or more appliances 200 or without an appliance 200.

Referring now to FIG. 2B, an example embodiment of the networkoptimization engine 250 deployed on one or more end nodes is depicted.In brief overview, the client 102 may include a first networkoptimization engine 250′ and the server 106 may include a second networkoptimization engine 250″. The client 102 and server 106 may establish atransport layer connection and exchange communications with or withouttraversing an appliance 200.

In one embodiment, the network optimization engine 250′ of the client102 performs the techniques described herein to optimize, accelerate orotherwise improve the performance, operation or quality of service ofnetwork traffic communicated with the server 106. In another embodiment,the network optimization engine 250″ of the server 106 performs thetechniques described herein to optimize, accelerate or otherwise improvethe performance, operation or quality of service of network trafficcommunicated with the client 102. In some embodiments, the networkoptimization engine 250′ of the client 102 and the network optimizationengine 250″ of the server 106 perform the techniques described herein tooptimize, accelerate or otherwise improve the performance, operation orquality of service of network traffic communicated between the client102 and the server 106. In yet another embodiment, the networkoptimization engine 250′ of the client 102 performs the techniquesdescribed herein in conjunction with an appliance 200 to optimize,accelerate or otherwise improve the performance, operation or quality ofservice of network traffic communicated with the client 102. In stillanother embodiment, the network optimization engine 250″ of the server106 performs the techniques described herein in conjunction with anappliance 200 to optimize, accelerate or otherwise improve theperformance, operation or quality of service of network trafficcommunicated with the server 106.

C. Client Agent

As illustrated in FIGS. 2A and 2B, a client deployed in the system orwith an appliance 200 or 205 may include a client agent 120. In oneembodiment, the client agent 120 is used to facilitate communicationswith one or more appliances 200 or 205. In some embodiments, any of thesystems and methods of the appliance 200 or 205 described herein may bedeployed, implemented or embodied in a client, such as via a clientagent 120. In other embodiments, the client agent 120 may includeapplications, programs, or agents providing additional functionalitysuch as end point detection and authorization, virtual private networkconnectivity, and application streaming. Prior to discussing otherembodiments of systems and methods of the appliance 200, embodiments ofthe client agent 120 will be described.

Referring now to FIG. 3, an embodiment of a client agent 120 isdepicted. The client 102 has a client agent 120 for establishing,exchanging, managing or controlling communications with the appliance200, appliance 205 and/or server 106 via a network 104. In someembodiments, the client agent 120, which may also be referred to as aWAN client, accelerates WAN network communications and/or is used tocommunicate via appliance 200 on a network. In brief overview, theclient 102 operates on computing device 100 having an operating systemwith a kernel mode 302 and a user mode 303, and a network stack 267 withone or more layers 310 a-310 b. The client 102 may have installed and/orexecute one or more applications. In some embodiments, one or moreapplications may communicate via the network stack 267 to a network 104.One of the applications, such as a web browser, may also include a firstprogram 322. For example, the first program 322 may be used in someembodiments to install and/or execute the client agent 120, or anyportion thereof. The client agent 120 includes an interceptionmechanism, or interceptor 350, for intercepting network communicationsfrom the network stack 267 from the one or more applications.

As with the appliance 200, the client has a network stack 267 includingany type and form of software, hardware, or any combinations thereof,for providing connectivity to and communications with a network 104. Thenetwork stack 267 of the client 102 includes any of the network stackembodiments described above in conjunction with the appliance 200. Insome embodiments, the client agent 120, or any portion thereof, isdesigned and constructed to operate with or work in conjunction with thenetwork stack 267 installed or otherwise provided by the operatingsystem of the client 102.

In further details, the network stack 267 of the client 102 or appliance200 (or 205) may include any type and form of interfaces for receiving,obtaining, providing or otherwise accessing any information and datarelated to network communications of the client 102. In one embodiment,an interface to the network stack 267 includes an applicationprogramming interface (API). The interface may also have any functioncall, hooking or filtering mechanism, event or call back mechanism, orany type of interfacing technique. The network stack 267 via theinterface may receive or provide any type and form of data structure,such as an object, related to functionality or operation of the networkstack 267. For example, the data structure may include information anddata related to a network packet or one or more network packets. In someembodiments, the data structure includes, references or identifies aportion of the network packet processed at a protocol layer of thenetwork stack 267, such as a network packet of the transport layer. Insome embodiments, the data structure 325 is a kernel-level datastructure, while in other embodiments, the data structure 325 is auser-mode data structure. A kernel-level data structure may have a datastructure obtained or related to a portion of the network stack 267operating in kernel-mode 302, or a network driver or other softwarerunning in kernel-mode 302, or any data structure obtained or receivedby a service, process, task, thread or other executable instructionsrunning or operating in kernel-mode of the operating system.

Additionally, some portions of the network stack 267 may execute oroperate in kernel-mode 302, for example, the data link or network layer,while other portions execute or operate in user-mode 303, such as anapplication layer of the network stack 267. For example, a first portion310 a of the network stack may provide user-mode access to the networkstack 267 to an application while a second portion 310 a of the networkstack 267 provides access to a network. In some embodiments, a firstportion 310 a of the network stack has one or more upper layers of thenetwork stack 267, such as any of layers 5-7. In other embodiments, asecond portion 310 b of the network stack 267 includes one or more lowerlayers, such as any of layers 1-4. Each of the first portion 310 a andsecond portion 310 b of the network stack 267 may include any portion ofthe network stack 267, at any one or more network layers, in user-mode303, kernel-mode, 302, or combinations thereof, or at any portion of anetwork layer or interface point to a network layer or any portion of orinterface point to the user-mode 302 and kernel-mode 203.

The interceptor 350 may include software, hardware, or any combinationof software and hardware. In one embodiment, the interceptor 350intercepts or otherwise receives a network communication at any point inthe network stack 267, and redirects or transmits the networkcommunication to a destination desired, managed or controlled by theinterceptor 350 or client agent 120. For example, the interceptor 350may intercept a network communication of a network stack 267 of a firstnetwork and transmit the network communication to the appliance 200 fortransmission on a second network 104. In some embodiments, theinterceptor 350 includes or is a driver, such as a network driverconstructed and designed to interface and work with the network stack267. In some embodiments, the client agent 120 and/or interceptor 350operates at one or more layers of the network stack 267, such as at thetransport layer. In one embodiment, the interceptor 350 includes afilter driver, hooking mechanism, or any form and type of suitablenetwork driver interface that interfaces to the transport layer of thenetwork stack, such as via the transport driver interface (TDI). In someembodiments, the interceptor 350 interfaces to a first protocol layer,such as the transport layer and another protocol layer, such as anylayer above the transport protocol layer, for example, an applicationprotocol layer. In one embodiment, the interceptor 350 includes a drivercomplying with the Network Driver Interface Specification (NDIS), or aNDIS driver. In another embodiment, the interceptor 350 may be amin-filter or a mini-port driver. In one embodiment, the interceptor350, or portion thereof, operates in kernel-mode 202. In anotherembodiment, the interceptor 350, or portion thereof, operates inuser-mode 203. In some embodiments, a portion of the interceptor 350operates in kernel-mode 202 while another portion of the interceptor 350operates in user-mode 203. In other embodiments, the client agent 120operates in user-mode 203 but interfaces via the interceptor 350 to akernel-mode driver, process, service, task or portion of the operatingsystem, such as to obtain a kernel-level data structure 225. In furtherembodiments, the interceptor 350 is a user-mode application or program,such as application.

In one embodiment, the interceptor 350 intercepts or receives anytransport layer connection requests. In these embodiments, theinterceptor 350 executes transport layer application programminginterface (API) calls to set the destination information, such asdestination IP address and/or port to a desired location for thelocation. In this manner, the interceptor 350 intercepts and redirectsthe transport layer connection to an IP address and port controlled ormanaged by the interceptor 350 or client agent 120. In one embodiment,the interceptor 350 sets the destination information for the connectionto a local IP address and port of the client 102 on which the clientagent 120 is listening. For example, the client agent 120 may comprise aproxy service listening on a local IP address and port for redirectedtransport layer communications. In some embodiments, the client agent120 then communicates the redirected transport layer communication tothe appliance 200.

In some embodiments, the interceptor 350 intercepts a Domain NameService (DNS) request. In one embodiment, the client agent 120 and/orinterceptor 350 resolves the DNS request. In another embodiment, theinterceptor transmits the intercepted DNS request to the appliance 200for DNS resolution. In one embodiment, the appliance 200 resolves theDNS request and communicates the DNS response to the client agent 120.In some embodiments, the appliance 200 resolves the DNS request viaanother appliance 200′ or a DNS server 106.

In yet another embodiment, the client agent 120 may include two agents120 and 120′. In one embodiment, a first agent 120 may include aninterceptor 350 operating at the network layer of the network stack 267.In some embodiments, the first agent 120 intercepts network layerrequests such as Internet Control Message Protocol (ICMP) requests(e.g., ping and traceroute). In other embodiments, the second agent 120′may operate at the transport layer and intercept transport layercommunications. In some embodiments, the first agent 120 interceptscommunications at one layer of the network stack 210 and interfaces withor communicates the intercepted communication to the second agent 120′.

The client agent 120 and/or interceptor 350 may operate at or interfacewith a protocol layer in a manner transparent to any other protocollayer of the network stack 267. For example, in one embodiment, theinterceptor 350 operates or interfaces with the transport layer of thenetwork stack 267 transparently to any protocol layer below thetransport layer, such as the network layer, and any protocol layer abovethe transport layer, such as the session, presentation or applicationlayer protocols. This allows the other protocol layers of the networkstack 267 to operate as desired and without modification for using theinterceptor 350. As such, the client agent 120 and/or interceptor 350interfaces with or operates at the level of the transport layer tosecure, optimize, accelerate, route or load-balance any communicationsprovided via any protocol carried by the transport layer, such as anyapplication layer protocol over TCP/IP.

Furthermore, the client agent 120 and/or interceptor 350 may operate ator interface with the network stack 267 in a manner transparent to anyapplication, a user of the client 102, the client 102 and/or any othercomputing device 100, such as a server or appliance 200, 206, incommunications with the client 102. The client agent 120, or any portionthereof, may be installed and/or executed on the client 102 in a mannerwithout modification of an application. In one embodiment, the clientagent 120, or any portion thereof, is installed and/or executed in amanner transparent to any network configuration of the client 102,appliance 200, 205 or server 106. In some embodiments, the client agent120, or any portion thereof, is installed and/or executed withmodification to any network configuration of the client 102, appliance200, 205 or server 106. In one embodiment, the user of the client 102 ora computing device in communications with the client 102 are not awareof the existence, execution or operation of the client agent 12, or anyportion thereof. As such, in some embodiments, the client agent 120and/or interceptor 350 is installed, executed, and/or operatedtransparently to an application, user of the client 102, the client 102,another computing device, such as a server or appliance 200, 2005, orany of the protocol layers above and/or below the protocol layerinterfaced to by the interceptor 350.

The client agent 120 includes a streaming client 306, a collection agent304, SSL VPN agent 308, a network optimization engine 250, and/oracceleration program 302. In one embodiment, the client agent 120 is anIndependent Computing Architecture (ICA) client, or any portion thereof,developed by Citrix Systems, Inc. of Fort Lauderdale, Fla., and is alsoreferred to as an ICA client. In some embodiments, the client agent 120has an application streaming client 306 for streaming an applicationfrom a server 106 to a client 102. In another embodiment, the clientagent 120 includes a collection agent 304 for performing end-pointdetection/scanning and collecting end-point information for theappliance 200 and/or server 106. In some embodiments, the client agent120 has one or more network accelerating or optimizing programs oragents, such as a network optimization engine 250 and an accelerationprogram 302. In one embodiment, the acceleration program 302 acceleratescommunications between client 102 and server 106 via appliance 205′. Insome embodiments, the network optimization engine 250 provides WANoptimization techniques as discussed herein.

The streaming client 306 is an application, program, process, service,task or set of executable instructions for receiving and executing astreamed application from a server 106. A server 106 may stream one ormore application data files to the streaming client 306 for playing,executing or otherwise causing to be executed the application on theclient 102. In some embodiments, the server 106 transmits a set ofcompressed or packaged application data files to the streaming client306. In some embodiments, the plurality of application files arecompressed and stored on a file server within an archive file such as aCAB, ZIP, SIT, TAR, JAR or other archives. In one embodiment, the server106 decompresses, unpackages or unarchives the application files andtransmits the files to the client 102. In another embodiment, the client102 decompresses, unpackages or unarchives the application files. Thestreaming client 306 dynamically installs the application, or portionthereof, and executes the application. In one embodiment, the streamingclient 306 may be an executable program. In some embodiments, thestreaming client 306 may be able to launch another executable program.

The collection agent 304 is an application, program, process, service,task or set of executable instructions for identifying, obtaining and/orcollecting information about the client 102. In some embodiments, theappliance 200 transmits the collection agent 304 to the client 102 orclient agent 120. The collection agent 304 may be configured accordingto one or more policies of the policy engine 236 of the appliance. Inother embodiments, the collection agent 304 transmits collectedinformation on the client 102 to the appliance 200. In one embodiment,the policy engine 236 of the appliance 200 uses the collectedinformation to determine and provide access, authentication andauthorization control of the client's connection to a network 104.

In one embodiment, the collection agent 304 is an end-point detectionand scanning program, which identifies and determines one or moreattributes or characteristics of the client. For example, the collectionagent 304 may identify and determine any one or more of the followingclient-side attributes: 1) the operating system an/or a version of anoperating system, 2) a service pack of the operating system, 3) arunning service, 4) a running process, and 5) a file. The collectionagent 304 may also identify and determine the presence or version of anyone or more of the following on the client: 1) antivirus software, 2)personal firewall software, 3) anti-spam software, and 4) internetsecurity software. The policy engine 236 may have one or more policiesbased on any one or more of the attributes or characteristics of theclient or client-side attributes.

The SSL VPN agent 308 is an application, program, process, service, taskor set of executable instructions for establishing a Secure Socket Layer(SSL) virtual private network (VPN) connection from a first network 104to a second network 104′, 104″, or a SSL VPN connection from a client102 to a server 106. In one embodiment, the SSL VPN agent 308establishes a SSL VPN connection from a public network 104 to a privatenetwork 104′ or 104″. In some embodiments, the SSL VPN agent 308 worksin conjunction with appliance 205 to provide the SSL VPN connection. Inone embodiment, the SSL VPN agent 308 establishes a first transportlayer connection with appliance 205. In some embodiment, the appliance205 establishes a second transport layer connection with a server 106.In another embodiment, the SSL VPN agent 308 establishes a firsttransport layer connection with an application on the client, and asecond transport layer connection with the appliance 205. In otherembodiments, the SSL VPN agent 308 works in conjunction with WANoptimization appliance 200 to provide SSL VPN connectivity.

In some embodiments, the acceleration program 302 is a client-sideacceleration program for performing one or more acceleration techniquesto accelerate, enhance or otherwise improve a client's communicationswith and/or access to a server 106, such as accessing an applicationprovided by a server 106. The logic, functions, and/or operations of theexecutable instructions of the acceleration program 302 may perform oneor more of the following acceleration techniques: 1) multi-protocolcompression, 2) transport control protocol pooling, 3) transport controlprotocol multiplexing, 4) transport control protocol buffering, and 5)caching via a cache manager. Additionally, the acceleration program 302may perform encryption and/or decryption of any communications receivedand/or transmitted by the client 102. In some embodiments, theacceleration program 302 performs one or more of the accelerationtechniques in an integrated manner or fashion. Additionally, theacceleration program 302 can perform compression on any of theprotocols, or multiple-protocols, carried as a payload of a networkpacket of the transport layer protocol.

In one embodiment, the acceleration program 302 is designed, constructedor configured to work with appliance 205 to provide LAN sideacceleration or to provide acceleration techniques provided viaappliance 205. For example, in one embodiment of a NetScaler appliance205 manufactured by Citrix Systems, Inc., the acceleration program 302includes a NetScaler client. In some embodiments, the accelerationprogram 302 provides NetScaler acceleration techniques stand-alone in aremote device, such as in a branch office. In other embodiments, theacceleration program 302 works in conjunction with one or more NetScalerappliances 205. In one embodiment, the acceleration program 302 providesLAN-side or LAN based acceleration or optimization of network traffic.

In some embodiments, the network optimization engine 250 may bedesigned, constructed or configured to work with WAN optimizationappliance 200. In other embodiments, network optimization engine 250 maybe designed, constructed or configured to provide the WAN optimizationtechniques of appliance 200, with or without an appliance 200. Forexample, in one embodiment of a WANScaler appliance 200 manufactured byCitrix Systems, Inc. the network optimization engine 250 includes theWANscaler client. In some embodiments, the network optimization engine250 provides WANScaler acceleration techniques stand-alone in a remotelocation, such as a branch office. In other embodiments, the networkoptimization engine 250 works in conjunction with one or more WANScalerappliances 200.

In another embodiment, the network optimization engine 250 includes theacceleration program 302, or the function, operations and logic of theacceleration program 302. In some embodiments, the acceleration program302 includes the network optimization engine 250 or the function,operations and logic of the network optimization engine 250. In yetanother embodiment, the network optimization engine 250 is provided orinstalled as a separate program or set of executable instructions fromthe acceleration program 302. In other embodiments, the networkoptimization engine 250 and acceleration program 302 are included in thesame program or same set of executable instructions.

In some embodiments, and still referring to FIG. 3, a first program 322may be used to install and/or execute the client agent 120, or anyportion thereof, automatically, silently, transparently, or otherwise.In one embodiment, the first program 322 is a plugin component, such anActiveX control or Java control or script that is loaded into andexecuted by an application. For example, the first program comprises anActiveX control loaded and run by a web browser application, such as inthe memory space or context of the application. In another embodiment,the first program 322 comprises a set of executable instructions loadedinto and run by the application, such as a browser. In one embodiment,the first program 322 is a designed and constructed program to installthe client agent 120. In some embodiments, the first program 322obtains, downloads, or receives the client agent 120 via the networkfrom another computing device. In another embodiment, the first program322 is an installer program or a plug and play manager for installingprograms, such as network drivers and the client agent 120, or anyportion thereof, on the operating system of the client 102.

In some embodiments, each or any of the portions of the client agent120—a streaming client 306, a collection agent 304, SSL VPN agent 308, anetwork optimization engine 250, acceleration program 302, andinterceptor 350—may be installed, executed, configured or operated as aseparate application, program, process, service, task or set ofexecutable instructions. In other embodiments, each or any of theportions of the client agent 120 may be installed, executed, configuredor operated together as a single client agent 120.

D. Systems and Methods for Using Shared Compression Histories

Referring now to FIG. 4A, a block diagram of an embodiment of using ashared compression history to reduce the size of transmitted data isshown. In brief overview, two clients, 102 a and 102 b, transmit datavia two appliances, 200 a and 200 b, having compression histories 400 aand 400 b (generally 400) respectively and which communicate over anetwork 104. The compression histories 400 a and 400 b are used tocompress data transmitted between the appliances 200 a, 200 b, andcomprise portions of data previously transmitted between the twoappliances 200 a, 200 b. The appliance 200 a compresses the datatransmitted via the network 104 by identifying portions of data in adata stream sent by a client 102 a which have previously beentransmitted between the two clients. The appliance 200 a then replacesthose portions of data with a reference to a location in the compressionhistories 400 a, 400 b, reducing the volume of data transmitted, whileallowing the corresponding appliance 200 b to accurately reconstruct theoriginal data stream. A client 102 c containing a network optimizationengine 250 a may also use a compression history 400 c to acceleratecommunications with an appliance 200 or second client 102 d having acompression history 400 d.

Still referring to FIG. 4A, now in greater detail, a client 102 atransmits a data stream to an appliance 200 a. The data stream maycomprise any type of data sent over a network, including any protocol.In some embodiments, the data stream may be transmitted via a transportlayer connection, such as a TCP connection. In other embodiments, thedata stream may be transmitted via a session-layer protocol, such asSSL. In some embodiments, some or all of the data stream may beencrypted.

In some embodiments, one or more of the appliances 200 a may operatetransparently to one or more of the clients 102 a, 102 b. In otherembodiments, one or more of the appliances 200 a may operate as atransparent proxy for one or more of the clients 102 a, 102 b. Forexample, the appliances 200 a and 200 b may intercept and compressnetwork traffic via a TCP connection between clients 102 a and 102 btransparently to one or both of the clients 102 a, 102 b. In thisexample, the client 102 a may send a TCP stream addressed to client 102b which is intercepted by the appliances 200 a. The appliance 200 a maythen compress the data stream and forward to client 102 b via appliance200 b. Appliance 200 b, after receiving the stream, may then decompressand forward the data stream to client 102 b. In this way, client 102 aand client 102 b are able to maintain their use of standard TCPprotocols and addresses.

The appliances 200 a, 200 b maintain synchronized compression histories400 a, 400 b, each of which contain data previously transmitted betweenthe appliances 200 b. These synchronized compression histories may alsobe referred to as shared compression histories. The compressionhistories 400 a, 400 b may be synchronized by any means. In oneembodiment, the compression histories may be synchronized by means ofthe appliances 200 a 200 b intercepting and storing the same datastreams to the compression histories 400 a 400 b. In another embodiment,the appliances 200 a, 200 b may transfer all or a portion of acompression history between themselves. In some embodiments, thecompression histories may be only imperfectly or partially synchronized.A compression history 400 may reside on any storage medium, includingwithout limitation, RAM and disks. In some embodiments, a compressionengine 238 residing on an appliance 200 may maintain a compressionhistory 400.

A compression history 400 may store any type and form of data, includingany previously transmitted data. In some embodiments, an appliance maystore all data that passes through the appliance to the compressionhistory. In other embodiments, an appliance may select portions of datafrom a data stream to be stored in the compression history based on anyfactor including, without limitation, the data stream source, datastream destination, transmission protocol, application protocols,available disk space, current disk usage, available memory space,current available bandwidth, and size of the data portions. In someembodiments, the data stored in the compression history may becompressed using a lossless compression algorithm. In one embodiment, acompression history may store data in chunks, which will be discussedwith reference to FIG. 4B.

In some embodiments, an appliance may store the payloads, or anyportions thereof, of any protocol layer of packets passing transmittedvia the appliance in the compression history. In one embodiment, anappliance may store only the payload of TCP packets transmitted via theappliance in a compression history. In one embodiment, the appliancestores application data obtained via an application layer protocol tothe compression history 1138. In some embodiments, the appliance storesheaders of the network packet, such as application layer header of anHTTP payload, to a compression history. In other embodiments, theappliance does not store headers of the network packet. In anotherembodiment, an appliance may store only the payload of a UDP packettransmitted via the appliance in a compression history. In oneembodiment, an appliance may elect not to store any encrypted data inthe compression history. In another embodiment, an appliance may decryptencrypted data and store the decrypted data in a compression history. Instill another embodiment, an appliance may store encrypted data to acompression history.

A compression engine 238 may store the compression history 400 instorage 128, such as disk, memory, such as RAM, or a combination ofstorage and memory. In some embodiments, the compression engine 238 usesan object or data index to reference or identify corresponding objectsor data stored in the compression history. A specific example of oneembodiment of such an index is given in FIG. 4C. In one embodiment, acompression engine 238 uses an object index stored in memory. In otherembodiments, a compression engine 238 uses an object index stored todisk. An object index may comprise any type and form of indexing schemefor corresponding an index to an object in a compression history 400. Inone embodiment, an object index is maintained in memory while thecorresponding object is stored a compression history 400. In someembodiments, an object index comprises an entry that references oridentifies a location or pointer to the object stored in the compressionhistory 400. In some embodiments, some or all of a compression historyor an index may be stored in a cache 232. In other embodiments, some orall of a cache 232 may be stored using a compression history.

In writing a portion of transmitted data to the compression history, anappliance may create a shared identifier to enable the appliance and anappliance receiving the transmitted data to refer to the portion of datain later communications. In one embodiment, this identifier may be aunique identifier between the two appliances. In other embodiments, thisshared identifier may be a globally unique identifier among a pluralityof appliances. The shared identifier may be created, for example, bytracking the number of bytes sent via a connection between theappliances and assigning successive identifiers to successive bytestransmitted.

In some embodiments, a single appliance 200 may maintain multiplecompression histories. For example, an appliance 200 a in communicationwith multiple other appliances may maintain a separate compressionhistory containing the data transmitted to and from each appliance. Inone embodiment, these separate compression histories may be physicallyseparate, such as where separate disks are maintained for eachcompression history. In another embodiment, these separate compressionhistories may be logically separate, such as where multiple compressionhistories are intermingled on a single disk, with identifiers or indicesidentifying which compression history or compression histories a givendata portion belongs to.

In the embodiment shown, the appliance 200 a used the compressionhistory 400 a to identify portions of data in the data stream from theclient 102 a which have previously been transmitted to the appliance 200b. The appliance then replaces those portions of the data stream withidentifiers identifying the locations of the compression historycontaining those portions before sending the data stream to appliance200 b. For example, the appliance may replace a sequence of 120 byteswith a reference to a memory location containing the sequence and aninstruction to include 120 bytes from the referenced location.

Upon receiving the data stream containing a reference to a location inthe compression history, the appliance 200 b searches its compressionhistory 400 b for the identified portion of data. The appliance 200 bthen replaces the identifier in the data stream with the identifiedportion of data, and sends the reconstructed data stream to the client102 b.

In these embodiments and subsequent embodiments discussed below, thecompression history and caching functions performed by the appliances200 a, 200 b may be performed by one or more of a client 102, clientagent 120, or server 106. For example, a client agent 120 may maintain acompression history 400 comprising portions of data previouslytransmitted to a server, the server also maintain a correspondingcompression history. The client agent 120 and the server 106 may thencompress data sent between the server and a client on which the clientagent 120 resides by using the compression histories.

Referring now to FIG. 4B, a block diagram of one embodiment of a datastructure used to store data in a compression history is shown. In briefoverview, a compression history 400 comprises a plurality storage unitsreferred to as chunks 405 a, 405 b, 405 c, 405 d (generally referred toas 405) for storing data of a compression history. Each chunk 405comprises a header 455 having a status identifier 475 and a next chunkpointer 485. Each chunk also includes a section containing previouslytransmitted data 465.

Still referring to FIG. 4B, now in greater detail, a compression history400 comprises a number of chunks 405. A chunk may refer to any discretephysical or logical storage element. Examples of a chunk may include aregion of a disk, multiple sequential regions of a disk, and a memorylocation, a series of consecutive memory locations. For example, a 10 MBdisk may be divided into 1,000 10 KB chunks, where each chunk is a 10Klogically contiguous region on the disk. Or for example, two 10 MB disksmay be divided into 20,000 1 KB chunks, with one or more chunks crossingdisks. In other embodiments, a chunk may comprise non-sequential areasof a disk or disks. For example, a 2K chunk may be stored in 4 separate512-byte pieces, and a data structure may be maintained which identifiesthe locations of the separate pieces. In still other embodiments, achunk header 455 may be stored in a different location than a chunkpayload 465. For example, one or more chunk headers 455 may bemaintained in memory, while the chunk data 465 may be maintained on adisk.

A chunk may be any size, including without limitation 32 bytes, 64bytes, 100 bytes, 128 bytes, 256 bytes, 512 bytes, 1K, 2K, 3K, 4K, 8K,10K, 16K, 32K, 64K, and 128K. In some embodiments, some chunks may onlybe partially filled with data. For example, in an embodiment wherechunks have a fixed size of 5K, a chunk may only include 2K of data in acase where the chunk held the last bytes of a given transmission.

In some embodiments, a series of chunks may be stored sequentially on adisk or in memory. In other embodiments, chunks may be stored in aplurality of locations on a disk or in memory. For example, in oneembodiment, an appliance may store chunks which contain data transmittedto another appliance in a contiguous section of a disk. In anotherembodiment, a compression engine on a client may store chunks with datatransmitted to a first appliance interleaved on disk with chunksincluding data transmitted to a second appliance.

In some embodiments, an appliance may create a new chunk for each newconnection that is opened via the appliance. For example, in anappliance serving as an intermediary for a plurality of TCP connections,an appliance may create a new chunk each time a new TCP connection isopened, and store the data from the TCP connection in the chunk. In thisexample, the appliance may create additional chunks for a TCP connectionif the initial chunk becomes full. In this embodiment, the appliance mayensure that each chunk holds data from only one TCP connection. Theappliance may store any information relating to the TCP connection,including timestamps, sequence numbers, and source and destinationaddresses in one or more chunk headers.

In some embodiments, a compression history may contain chunks of auniform size. In other embodiments, a compression history may containchunks of varying sizes.

The compression history shown comprises a plurality of chunks 405. Eachchunk contains a chunk header 455. A chunk header 405 may comprise anyidentifying, navigational, or historical data relating to the chunk.Examples of data which may be stored in a chunk header include, withoutlimitation, a chunk identifier, a pointer to the next chunk in asequence, a pointer to a previous chunk in a sequence, a size for thechunk, a time the chunk was created, a time the chunk was last accessed,a total number of times the chunk has been accessed, and a checksum orother error correcting measures.

In the embodiment shown, the chunk includes a chunk identifier, whichmay comprise a unique serial number assigned to the chunk. In oneembodiment, this unique serial number may correspond to a memory addressof the chunk, such as a starting address of the location of the chunk inmemory or on a disk. In other embodiments, the chunk identifier maycorrespond to a location within a sequence of transmitted data. Forexample, in a compression history shared between two devices, a chunkwith serial number 4,500,000 may contain the 4,500,000^(th) bytetransmitted between the two appliances and some number of subsequentbytes. The chunk identifier corresponding to a portion of transmitteddata may be shared with the corresponding appliance either explicitly orimplicitly. For example, two appliances may use the above method suchthat a given portion of transmitted data will have the same chunkidentifier on both appliances. In this manner the unique serial numberrefers to an identical portion of data residing on two or moreappliances. In another example, after a first appliance transmits agiven number of bytes to a second appliance, the first appliance maytransmit a chunk identifier identifying the chunk in which the firstappliance stored the transmitted data. The second appliance may thenrecord the received chunk identifier in a table corresponding to thesecond appliance's chunk identifier assigned to the same data.

In one embodiment, chunk identifiers may be globally unique among aplurality of appliances. For example, in a set of appliances, each withunique serial numbers, an appliance may append the appliance's serialnumber to the beginning or end of a locally unique chunk identifier tocreate a globally unique chunk identifier. In another embodiment, eachdevice storing transmitted data to chunks on a disk may create a chunkidentifier by appending the disk serial number to a chunk serial number.If the chunk serial numbers are never reused, this technique may be usedto create globally unique chunk identifiers. A device may then transmitto a recipient of the transmitted data the created chunk identifier sothat a table of correspondences can be maintained on the receivingdevice.

In some embodiments, some or all of the data included in the chunkheader 455 may be stored in a footer after the chunk. In still otherembodiments, some or all of the data contained in the chunk header 455may be stored in an external table or other data structure.

Referring now to FIG. 4C, a block diagram of one embodiment of a datastructure which can be used to locate data portions in a compressionhistory a compression index 410 is shown. In brief overview, acompression index 410 contains a number of location identifiers 420arranged in a table. Each row of the table corresponds to a given datafingerprint. For example, row 4 of the table contains locationidentifiers for portions of data in the compression history that have adata fingerprint equal to 4. Each of the location identifiers 420 pointsto a location in a compression history 400 by identifying a locationwithin a given chunk. In the embodiment shown, the location identifiersidentify a particular chunk and an offset within the chunk.

Still referring to FIG. 4C, now in greater detail, a compression index410 includes a number of location identifiers 420 arranged in an indexwhere each row corresponds to a given data fingerprint. The index may beimplemented using any data structure, including arrays, tables, hashtables, and linked lists, binary trees, red-black trees, and tries. Theindex may also be implemented using any technique for implementing ahash table. For example, in one embodiment, the index may be implementedas an array of linked lists, where each linked list corresponds to a rowof the index. In another embodiment, the table may be implemented as asingle two dimensional array. In this embodiment, if a row of the arraybecomes full, the least recently used location identifier in the row maybe discarded. In still other embodiments, the index may be implementedas a single array where hash collisions are resolved by placing locationidentifiers in array slots subsequent to a slot of the overloaded hashvalue. Throughout this specification the word “entry” may be also beused to indicate the portion of a compression index having locationidentifiers corresponding to a given fingerprint. Thus, with respect toFIG. 4C, entry 8 stores location identifiers C₇₃+x and C₂+x (where xrepresents any offset).

The location identifiers 420 may comprise any identifier which allowsthe appliance to locate the corresponding portion of data in acompression history. In one embodiment, a location identifier maycomprise a chunk identifier 475 and an offset. In another embodiment, alocation identifier may comprise a single address corresponding to amemory or disk location of the data portion. In still anotherembodiment, a location identifier may comprise an address and a sizeindicator.

After determining a portion of a compression history matches a portionof an input stream, an appliance may then perform a run-length extensionto determine a total length for the matching sequence. A run-lengthextension may be performed by comparing successive bytes in thecompression history to successive bytes of the input stream, without theneed for computing fingerprints. In some embodiments, a run-lengthextension may also compare previous bytes in the compression history toprevious bytes in the input stream. For example, if a 600-byte sequenceof input data has been buffered by an appliance 200 for latertransmission and a match is found in a compression history with respectto the 140-145th bytes, the appliance may compare previous andsuccessive bytes in the compression history with previous and successivebytes of the input stream to identify the full extent of the compressionhistory match. In some embodiments, a run-length extension may extendover a plurality of chunks. In these embodiments, next chunk andprevious chunk pointers contained within a given chunk may be used toidentify successive and preceding areas of the compression history.

E. Systems and Methods for Efficiently Identifying Compression HistoryMatches

Referring now to FIG. 5A, a block diagram illustrating one embodiment ofa method of using a compression index to locate compression historymatches corresponding to input data is shown. In brief overview, anappliance may intercept one or more data streams 510, 520. The applianceorganizes a data stream 510, 520 into a number of shingles, and thencomputes a fingerprint for each shingle. For example, the 10 characterstream “the quick” is treated as ten four-byte overlapping shingles.Each fingerprint then serves as an index into a compression index 410 a.For example, the shingle “the” produces a fingerprint of 4, whichcorresponds to row 4 of the compression index 410 a. This row has anumber of location identifiers pointing to locations in a compressionhistory including shingles which also have a fingerprint of 4.

Still referring to FIG. 5A, now in greater detail, an appliance dividesa data stream 510 into a number of shingles. In the embodiment shown,the data stream is the string “the quick”. The appliance breaks thestring into 4-byte shingles. In other embodiments, the shingles may beany other length, including, without limitation, 3, 5, 6, 7, 8, 10, 12,16, 32, or 64 bytes. In the embodiment shown, the appliance createsoverlapping shingles of 4 bytes for each successive byte in the datastream. In other embodiments, shingles may be non-overlapping. In stillother embodiments, an appliance may create shingles for only a subset ofthe bytes in a data stream. For example, an appliance may create ashingle for every other byte in a data stream, or every third byte in adata stream. In some embodiments, the appliance may compute afingerprint for a number of shingles in order to select the fingerprintwhich will be looked up in a compression index. This technique and otherfingerprint techniques are described more fully in U.S. Pat. No.7,098,815, “Method and apparatus for efficient compression,” the entirecontents of which are expressly incorporated by reference herein.

In the embodiment shown, the appliance computes a fingerprint value foreach shingle, which is then used as an index into a compression index410 a. In some embodiments, the appliance may then access the dataportion identified by a location identifier residing in the index. Theappliance may then do a byte-by-byte comparison of the data portion inthe compression history with the shingle to ensure that a match has beenfound. For example, this comparison may be necessary if thefingerprinting method does not produce a unique fingerprint for everypossible shingle, or if multiple fingerprints are consolidated into agiven “row” of the compression index 410 a. In one embodiment, when ashingle is found to match a given portion of data in the compressionhistory, an appliance may then do a run length extension of the match todetermine whether subsequent portions of the data in the compressionhistory match subsequent portions of the received input stream.

In one embodiment, an appliance may utilize a strategy of checking for aplurality of fingerprint matches before accessing a compression historyto confirm a match is found. In this embodiment, the appliance comparesthe location identifiers corresponding to subsequent shingles to see ifthe locations pointed to are subsequent sections of a single chunk. Theappliance may do this strategy to establish some likelihood that a matchof a given length actually exists, and is not either a false positivefrom the fingerprinting algorithm or a match of such a small length asto not provide significant compression benefit. The strategy may resultin performance improvements in cases where a compression history isstored on a disk, and thus may have slower access times than thecompression index, which may be stored in memory. This strategy also mayresult in performance improvements in cases where a compression historyis being heavily used by a plurality of connections, by minimizing thenumber of times a disk or memory region is accessed.

Still referring to FIG. 5A, an appliance may compute a fingerprint forthe first shingle “the” in the data stream 510. Upon checking thecompression index for entries corresponding to the fingerprint, theappliance finds a large number of entries, perhaps as a result of largenumbers of previously transmitted data containing the byte sequence“the”. The appliance may then compute a fingerprint for the next shingle“he_q”, and find only a single match, identifying chunk 6 and a givenoffset. The appliance may then compute a fingerprint for the nextshingle “e_qu”, and find only a single match, identifying chunk 2 and anoffset of 6. Since chunk 2 and chunk 6 do not represent sequential areasin the compression history, there is a very low probability that eitherof these chunks will contain a match for anything other than theindividual shingles. The appliance may thus determine to not accesseither of these portions of data in the compression history, and insteadsend the data uncompressed, or compressed using a compression mechanismother than a compression history.

With respect to data stream 520, the appliance may determine that thelocation identifiers associated with the consecutive shingles “brev”“revi” “evit” and “vity” identify consecutive portions of thecompression history, namely, they identify bytes 4,5,6, and 7 of chunk2. This indicates a substantial likelihood that a long match exists forthe data stream 520 on chunk 2. The appliance may then determine toaccess that portion of the compression history and perform a run-lengthextension to determine a total length for the matching sequence.

Referring now to FIG. 5B, a flow chart of one embodiment of a method ofdetermining whether to perform disk based compression by identifying inan index maintained in memory an estimated extent of a match of inputdata to contiguous data stored on disk is above or below a predeterminedthreshold is shown. In brief overview, a device having a compressionhistory establishes an index in memory that corresponds fingerprints ofa plurality of portions of data of the compression history to locationidentifiers identifying locations in a storage element having theplurality of portions of data (step 501). The device identifies a numberof fingerprints of input data match fingerprints of a plurality ofentries of the index in memory (step 503), and determines, from thenumber of identified fingerprints in memory having entries correspondingto a first location identifier that an estimated match of input data tocontiguous data on disk is extendable below a predetermined threshold(step 505). If the match is extendable below a given threshold, thedevice transmits the data uncompressed (step 507). If the match isextendable above the given threshold, the device uses the compressionhistory to compress the data (step 509). Although the method may bediscussed below in the context of being performed by an appliance, thedevice may comprise a client 102, server 106, appliance 200, or anyother computing device 100.

Still referring to FIG. 5B, now in greater detail, a device having acompression history stored establishes an index in memory thatcorresponds fingerprints of a plurality of portions of data of thecompression history to location identifiers identifying locations in astorage element having the plurality of portions of data (step 501). Inone embodiment, the index may comprise a compression index 410 asdescribed herein. The location identifiers may also comprise locationidentifiers 420 as described herein. In one embodiment, the locations ondisk may correspond to chunks 400 as described herein. The index may beestablished and maintained at any times. In one embodiment, the indexmay be updated each time data is stored in a compression history. Thestorage element may comprise any means of storage, including one or moreof RAM, disks, and flash memory. In some embodiments, the storageelement may reside on the device. In other embodiments, the storageelement may be connected to the device via a network. In one embodiment,the storage element may have a higher latency than the memory containingthe index.

In the embodiment shown, a device identifies a number of fingerprints ofinput data match fingerprints of a plurality of entries of the index inmemory (step 503). The input data may comprise input data from anysource. In one embodiment, the input data may comprise a data streamtransmitted to the device from a client 102 or server 106. In oneembodiment, the data stream may comprise data from a TCP connection forwhich the device is serving as a proxy. In another embodiment, the inputdata may comprise data sent from an application running on the device.

The device may compute fingerprints of the input data using anyfingerprinting method including, without limitation, a shingle method asdescribed herein. The number of fingerprints may be any number 2 orgreater, including 2, 3, 4, 5, 6, 7, 8, 9, and 10. For example, anappliance may compute fingerprints for four successive shingles of agiven data stream. In another embodiment, an appliance may computefingerprints for five proximate non-overlapping shingles in the inputdata. In one embodiment, the number of fingerprints may be predeterminedin order to balance the drawbacks of potentially skipping over smallmatching segments against the benefits gained by fewer disk accesses.

In the embodiment shown, the method then comprises determining, by thedevice, from the number of identified fingerprints in memory havingentries corresponding to a first location identifier that an estimatedmatch of input data to contiguous data on disk is extendable below apredetermined threshold (step 505). In one embodiment, this method maycomprise identifying that one or more of the fingerprints correspond toentries in the index which contain null pointers or another indicationthat no match exists in the compression history for the fingerprint. Inanother embodiment, this method may comprise identifying that two ormore of the fingerprints correspond to entries containing locationidentifiers pointing to non-contiguous locations of the compressionhistory. For example, with respect to the input stream 510, the devicemay determine that the locations identified by the fingerprints 1 and 9are not contiguous in the compression history. This indicates that thematch in the compression history corresponding to the beginning of theinput stream is no longer than 5 characters.

The predetermined threshold may comprise any number of bytes. In oneembodiment, the predetermined threshold may be 8, 12, 16, 32, 64, 128,or 256 bytes. In some embodiments, the predetermined threshold may bealtered in response to operational characteristics of the device. In oneembodiment, the threshold may be increased in response to an increase inthe number of connections passing through the device, an increase in theamount of data passing through the device, or an increase in aconnection speed relating to the input data. In another embodiment, thethreshold may be decreased in response to a reduction in the number ofconnections, a decrease in the amount of data passing through thedevice, or a decrease in connection speed relating to the input data.For example, in an appliance serving as a proxy compressing a number ofTCP connections, the appliance may increase the threshold in response toadditional TCP connections being opened in order to minimize theoccurrences of compression routines for two connections needing tosimultaneously access a disk containing compression histories.

In the embodiment shown, the method then comprises transmitting, by thedevice, the data uncompressed in response to a determination that thematch is not extendable above a given threshold (step 507). The devicemay then continue to compute fingerprints for subsequently receivedportions of input data to identify potential matches in the compressionhistory. The uncompressed data may be transmitted to an appliance, aclient, or any other device. In some embodiments, the transmitted datamay be compressed using a compression method other than the compressionhistory. For example, the data may then be compressed using run-lengthcompression or LZW compression. In one embodiment, the data may becompressed using only portions of the compression history that areavailable in a faster storage element. For example, a device maymaintain recently accessed portions of the compression history in acache. The device may choose to compress the data using only thoseportions which are available in cache.

If the match is extendable above a given threshold, the device may usethe compression history to compress the input data. Using thecompression history may comprise any method of accessing, referencing,or otherwise leveraging the compression history to attempt to compressthe input data. For example, the device may access the compressionhistory to determine whether portions of the compression history withfingerprints corresponding to the input data are byte-for-byte matchesof the input data. Or the device may, after accessing the compressionhistory to confirm a match, replace one or more portions of the inputdata with references to the compression history before retransmittingthe input data.

A potential problem with using shingles as indexes into compressionhistories is that in some cases a given shingle may occur in a largenumber of transmitted files or data. This may impede the ability of acompression engine to find long continuous matches in a compressionhistory for a given input stream. These long continuous matches may bedesirable for reducing the amount of transmitted data as well asreducing the number of disk accesses if a compression history is storedon a disk. For example, the shingle “<HTML” might be present in a largenumber of web pages. If an appliance then receives an input stream thatbegins with “<HTML”, even if the input stream is the beginning of a filewhich exists in the compression history of the appliance, the appliancemay have difficulty identifying which of a number of chunks containingthe shingle “<HTML” will match the rest of the input stream.

Referring now to FIG. 6A, a block diagram illustrating a secondembodiment of using a compression index to locate compression historymatches corresponding to input data is shown. In brief overview, aninput stream “Call me Ishmael” is processed into a number of shingles. Afingerprint is computed for each shingle and the corresponding row inthe index is identified. The appliance then counts the number oflocation identifiers in each row to determine which row to select forthe purposes of accessing the disk.

Still referring to FIG. 6A, an appliance (or client agent or serveragent) computes fingerprints for a number of shingles before accessing acompression history. After receiving the input string “Call me Ishmael”,the appliance computes fingerprints for each of the successiveoverlapping four-byte shingles that make up the input string. The firstshingle “Call” has a fingerprint value of 4, and the correspondingcompression index 410 b entry has a plurality of location identifiers.This may indicate that a number of chunks on disk contain the charactersequence “Call.” Rather than attempt to access one of these chunks, theappliance then proceeds to compute fingerprints for a number ofsuccessive shingles of the input string. In the example shown, theappliance computes fingerprints for the next 4 shingles. The appliancethen counts the number of location identifiers in each index entry. Inthe example shown, the shingle “all” has a fingerprint which matches onecompression history location, the single “ll m” has a fingerprint whichmatches three compression history locations, the shingle “l me” has afingerprint which matches two compression history locations, and theshingle “me” has a fingerprint which matches more than three compressionhistory locations. An observation may then be made that any longcompression history match containing the input string must containmatches to each of the shingles. Thus, if a long match exists in thecompression history, it must contain a match to the shingle “all”, whichonly has one location identifier in the corresponding entry. Thecompression engine may deduce that this location identifier is the mostlikely to point to an area of the compression history containing a longmatch, and access the compression history in the specified location. Thecompression engine may then perform a run-length expansion of the matchto determine a total length of the matching sequence.

The compression engine may determine the number of location identifiersin a compression index entry using any method. In one embodiment, thecompression engine may count the location identifiers in a given indexentry by iterating over each location identifier. In another embodiment,the compression engine may count the location identifiers by determininga total size of the compression index entry. In still anotherembodiment, each entry of a compression index may store a count of thenumber of location identifiers contained within the entry.

Referring now to FIG. 6B, a flow diagram of one embodiment of a methodfor determining a precedence for matching fingerprints of input data toan index of fingerprints identifying a plurality of instances of data ina compression history is shown. In brief overview, the method comprisesa device having a compression history establishing an index thatcorresponds fingerprints of a plurality of portions of data of thecompression history to location identifiers identifying locations an astorage element having the plurality of portions of data (step 601). Thedevice identifies that a plurality of fingerprints of input data match aplurality of entries in the index having at least one locationidentifier (step 603) and selects an entry of the plurality of entrieshaving a fewest number of location identifiers (step 605). The devicemay then match a first portion of the input data to data in a firstlocation in the compression history identified by the selected entry(step 607). The method may be performed by any device having acompression history, including a client, client agent, server, or serveragent. Further, this method may be performed in combination with any ofthe other compression history methods and systems described herein. Forexample, this method may be performed in combination with the methoddescribed in conjunction with FIG. 5B. In this example, a compressionengine might compute fingerprints for a number of shingles, identify theshingles having the fewest location identifiers in the index, and thencheck whether the location identifiers for those shingles pointed tosequential areas of the compression history.

Still referring to FIG. 6B, now in greater detail, a device establishesany type and form of index for a compression history a (step 601). Inone embodiment, the index may comprise a compression index 410. Inanother embodiment, the device may use a network optimization engine 250and/or compression engine 238 to establish the index. The index can useany data fingerprinting method, and the portions of data can be chosenusing any method. In one embodiment, the index may correspondfingerprints taken from a plurality of overlapping shingles to chunkidentifiers and offsets. In another embodiment, the index may correspondfingerprints taken from a plurality of overlapping shingles to memoryaddresses in a compression history. The data in the compression historymay be received from any source. In one embodiment, the data in thecompression history may comprise data previously transmitted by thedevice. The storage element storing the compression history may compriseany means of storage, including one or more of RAM, disks, and flashmemory. In some embodiments, the storage element may reside on thedevice. In other embodiments, the storage element may be connected tothe device via a network. In one embodiment, the storage element mayhave a higher latency than the memory containing the index.

After establishing the index, the device may identify that a pluralityof fingerprints of input data match a plurality of entries in the indexhaving at least one location identifier (step 603). The device maycompute fingerprints for any number and amount of input data. In oneembodiment, the device may compute fingerprints for four portions ofinput data. In another embodiment, the device may compute fingerprintsfor two, three, five, six, seven, eight, nine, ten, or more portions ofinput data. In one embodiment, the device may identify that a pluralityof fingerprints, each corresponding to a successive overlapping shingleof input data, match a plurality of entries.

In some embodiments, the device may compute fingerprints for a pluralityof portions of input data before checking the index for correspondinglocation identifiers. In other embodiments, the device may compute afingerprint for a portion of data, check the index for a correspondinglocation identifier, and then, if more than one location identifier isfound, the device may compute fingerprints for subsequent portions ofdata before accessing a compression history. For example, the device maycontinue to compute fingerprints and count corresponding locationidentifiers until the device computes a fingerprint for which only onelocation identifier is in the corresponding index entry. The device maythen select this entry (step 605) and access the location in thecompression history identified by the one location identifier anddetermine a length of the match.

The device may select an entry of the plurality of entries having afewest number of location identifiers (step 605). In some cases, thedevice may select an entry having only one location identifier. In othercases, the device may select an entry having more than one locationidentifier, but has the fewest number of location identifiers of theplurality. In these cases, the device may choose a location identifierto access from the entry using any method including, without limitation,selecting a location identifier randomly, or selecting a locationidentifier using the method described in FIG. 5B.

After selecting an entry, the device may match a first portion of theinput data to data in a first location in the compression historyidentified by the selected entry (step 607). This first portion may bethe portion whose fingerprint corresponded to the selected entry. Thematching may be performed by any method, including without limitationbyte-by-byte comparison, a second fingerprinting process, checksums, andrun length expansion.

If a match is found, the device may then compress the input data byreplacing the matching sequence of data with a reference to the matchingportion of the compression history in the subsequent transmission. Thedevice may then repeat any or all of the above steps with respect tosubsequent input data.

F. Systems and Methods for Removing Application Layer Headers fromCompression History Data

As discussed previously, many benefits may be associated withidentifying and using longer compression history matches as opposed toshorter matches. Potential benefits include fewer compression historyaccesses, improved compression ratios, and lower processing overhead.Another way to increase the likelihood of generating longer compressionhistory matches is to remove from compression history considerationinput data which is unlikely to be repeated. One example of data thatmay be unlikely to repeat is application layer protocol headers, whichmay include session numbers, timestamps, and other unique data. Byremoving these application layer headers from compression history data,longer compression history matches may be obtained, and compressionhistory space may be conserved.

Referring now to FIG. 7A, a block diagram illustrating one embodiment ofa technique for removing application layer protocol headers from datastored in a compression history is shown. In brief overview, anapplication data stream 700 is transmitted from a client 102 to anappliance 200. The application data stream comprises a number ofsequences of application data 720 a, 720 b, 720 c (generally 720)separated by application layer protocol headers 710 a, 710 b, 710 c(generally 710). The appliance 200 stores the portions of theapplication data 720 in a contiguous region of a compression history400.

Still referring to FIG. 7A, now in greater detail, an appliance 200 (inother embodiments, this could be a client agent, server agent, client,or server) receives an application data stream 700 via any type and formof protocol. An application data stream 700 may comprise any stream ofapplication layer data. As used in FIGS. 7A, 7B, 7C, 7D and theaccompanying description, the application layer may refer to theapplication layer (or layer 7) of the OSI model or the application layermay refer to any layer above the transport layer in the OSI model.Examples of application data streams include, without limitation, HTTPcommunications, Common Internet File System (CIFS) communications,Network File System (NFS) communications, ICA communications, and FileTransfer Protocol (FTP) communications. In one embodiment, the appliance200 may be serving as a proxy or as a transparent proxy for a datastream containing the application data stream 700. For example, theappliance 200 may be serving as a transparent proxy for a TCPconnection, wherein the payloads of the TCP packets comprise anapplication data stream.

An application data stream 700 may comprise a number of applicationlayer protocol headers 710. Application layer protocol headers maycomprise any sequence used by an application protocol to format,delineate, or carry information with respect to application data.Application layer protocol headers may occur anywhere within anapplication data stream, and anywhere within an application data object.The term application layer protocol header equally encompasses footers,trailers, and mid-object sequences. For example, a file accessapplication, such as CIFS, may transmit portions of files interspersedwith headers which indicate the size and location of the file datatransmitted with the headers. Application layer protocol headers 710 maybe delineated with special characters, formatting, and/orapplication-specific conventions. For example, an application layerprotocol header 710 may contain a size field indicating the size of afollowing portion of application data 720. Following a sequence ofapplication data 720 of the specified size may be another applicationlayer protocol header 710.

Application data 720 may comprise any data other than the applicationlayer protocol headers 710 transmitted for use by an application.Examples of application data 720 may include, without limitation, text,documents, files, images, objects, video streams, and audio streams. Inone case, application data 720 may comprise a file which is beingtransmitted between two computing devices using FTP. In another case,application data 720 may comprise portions of a file being transmittedbetween two computing devices using CIFS. In a third case, applicationdata 720 may comprise a file or data object to be used in a virtualizedapplication. For example, a remote user may be accessing a wordprocessing application provided by a central server. The central servermay provide access to the application by transmitting a number of dataobjects including, without limitation, executable portions of theapplication, graphical data to be displayed to the user, and one or moredocument files.

After receiving the application data stream 700, the appliance may parsethe application data stream 700 to identify the application layerprotocol headers 710 and the application data 720. In one embodiment,the appliance may identify application layer protocol headers byutilizing a parsing engine or a portion of a parsing engine tailored fora given application. For example, an appliance may be programmed tospecifically identify CIFS headers.

Once the application data 720 and application layer protocol headers 710have been identified, the appliance 200 may then store the applicationdata 720 in a sequential area of a compression history. In someembodiments, a sequential area of a compression history may comprise aphysically contiguous region of memory. In other embodiments, asequential area of a compression history may comprise a sequential areaof a single compression history chunk. In still other embodiments, asequential area of a compression history may comprise portions of aplurality of chunks that are logically sequential. For example, theapplication data 720 may be stored in a number of chunks, each chunkcontaining a pointer to the next chunk in the sequence. Or for examplethe application data 720 may be stored in a number of chunks scatteredacross a compression history, with an external data structure indicatingthe sequence of chunks including the application data 720.

In one embodiment, the appliance may not store the application layerprotocol headers 710. In another embodiment, the appliance may store theapplication layer protocol headers 710 in a separate area of thecompression history from the application data 720.

By storing the application data 720 sequentially in the compressionhistory, the appliance may be able to achieve longer compression historymatches if the identical application data is later transmitted via theappliance. Many application layer protocols utilize headers that may beunique to each transmission of application data. For example,application layer protocol headers may include information specific to asender or recipient of the application data, or specific to a particularsession in which application data is transmitted. By storing theapplication data sequentially and subsequently searching for compressionhistory matches only with respect to the application data, longermatches may be found.

Although in the embodiment shown the application data 720 is stored in asequential region of a compression history, in other embodiments theapplication data 720 may be stored in non-sequential regions of acompression history.

Referring now to FIG. 7B, a block diagram illustrating a secondembodiment of removing application layer protocol headers and from datastored in a compression history is shown. In brief overview, anappliance receives an application data stream 700 comprising a pluralityof application data objects 720, 721, which have been multiplexed overthe application data stream 700, and are separated by application layerprotocol headers 710. The appliance parses the application data stream700 to identify the application data objects, and stores eachapplication data object in a separate chunk of a compression history400.

Still referring to FIG. 7B, now in greater detail, an application dataobject may comprise any discrete unit of application data. Examples ofan application data object include, without limitation, a document, afile, an image, a video stream, and an audio stream. For example, anapplication may transmit a plurality of files via a single transportlayer connection. Portions of the plurality of files may be interspersedwith each other, and separated by application layer protocol headerswhich identify the files. In another example, a server may provideaccess to an application to a user. The server may transmit a number ofobjects comprising the application or objects used by the applicationover a single transport layer connection.

The appliance may use any information contained in the application datastream 700 to identify the application data objects 730, 731. In oneembodiment, the appliance may parse one or more application layerprotocol headers to identify the application data objects. In theembodiment shown, the appliance identifies that an application dataobject 730, has been split into two parts 730 a, 730 b for transmission.The appliance then stores the two parts 730 a, 730 b in a separatesequential regions of the compression history. Although FIG. 7B shows anappliance identifying two interspersed application data objects, inother embodiments an appliance may identify any number of interspersedapplication data objects. Also, although FIG. 7B shows an appliancestoring the application data objects in separate chunks, in otherembodiments the application data objects may be stored in the same chunkwhere the first object is stored in a first contiguous region of thechunk and the second application data object is stored in a secondcontiguous region of the chunk.

Storing application data objects in contiguous regions of a compressionhistory may enable longer compression history to be found if the sameapplication data object is again transmitted via the appliance. It maybe unlikely that a given application data object is interspersed in thesame way, and between the same other application data objects, aspreviously occurred. Thus while a given application data object 730 maybe transmitted many times via a given appliance 200, a search forcompression history matches based on the application data stream astransmitted may only yield matches as long as the application dataobject fragments 730 a and 730 b. By storing and parsing the applicationdata objects as complete units, an appliance may be able to improve thelength of subsequent compression history matches.

Referring now to FIG. 7C, a flow diagram of one embodiment of a methodfor improving compression history matches by removing application layerprotocol headers from compression history data is shown. In briefoverview, the method comprises transmitting, between a first device anda second device, an application data stream, the application data streamcomprising at least one application layer protocol header between afirst sequence of application data and a second sequence of applicationdata (step 701). The first device identifies the first sequence and thesecond sequence from the application data stream (step 703); and storesa combined sequence comprising the first sequence and the third sequenceto a compression history (step 705).

Still referring to FIG. 7C, now in greater detail, the method showncomprises transmitting, between a first device and a second device, anapplication data stream 700, the application data stream 700 comprisingat least one application layer protocol header 710 between a firstsequence of application data 720 and a second sequence of applicationdata 720 (step 701). The first and second devices may be any computingdevice 100. In one embodiment, the first and second devices may beappliances 200. In another embodiment, one or more of the first andsecond devices may be a client, server, client agent, or server agent.In one embodiment, the first and second devices may be WAN optimizationdevices. In another embodiment, the first and second devices may beserving as transparent proxies for a transport layer connection betweena client and a server.

The first and second sequences of application data 720 may comprise anysequences of application data. Examples of sequences of application datainclude sequential portions of a file, data object, image, text, ordocument being transferred. For example, the first sequence ofapplication data may comprise the first 5000 bytes of a portion of afile being transmitted via CIFS. The second sequence of application datamay then comprise the next 5000 bytes of the file, the first and secondsequences separated by a CIFS header.

In some embodiments, the first device may transmit a plurality ofsequences of application data, with an application layer protocol headerin between each sequence of application data. For example, two WANoptimization devices may be serving as transparent proxies for theconnection between the client and server. The server may then transmit a10 MB file to a client using NFS wherein the file is separated into 10 1MB portions with each portion delineated by an NFS header.

The first device identifies the first sequence and the second sequencefrom the application data stream by any means (step 703). In oneembodiment, the first device may parse one or more application layerprotocol header. In another embodiment, the first device may parse oneor more sequences of application data. The first device may identify anynumber of sequences of application data, separated by any number ofapplication layer protocol headers. In some embodiments, the seconddevice may similarly identify the first and second sequences ofapplication data, so that the second device can synchronize itscompression history with that of the first device. In other embodiments,the first device may transmit explicit notifications to the seconddevice identifying the first and second sequences of application data.

The first device may then store a combined sequence comprising the firstsequence and the second sequence to a compression history (step 705).The combined sequence may be stored to a logically or physicallysequential region of the compression history. In other embodiments, thecombined sequence may comprise any number of sequences of applicationdata. The second device may also store a combined sequence comprisingthe first sequence and the second sequence to a compression history.

For example, two WAN optimization devices may be serving as transparentproxies for the connection between the client and server. The server maythen transmit a 10 MB file to a client using NFS, wherein the file isseparated into 10 1 MB portions, with each portion delineated by an NFSheader. Each WAN optimization device may identify the portions of thefile by parsing the NFS headers. Each WAN optimization device may thenstore the portions in a sequential region of their respectivecompression histories. In this manner, the file as a whole may berepresented in the compression histories without the interveningprotocol headers. The appliances may then be able to achieve longercompression history matches in the event that the file is transmittedagain between the two devices.

Now referring to FIG. 7D, a flow diagram of a second embodiment of amethod for improving compression history matches by removing applicationlayer protocol headers from received data is shown. In brief overview,the method comprises receiving, by a first device, an application datastream, the application data stream comprising at least one applicationlayer protocol header between a first sequence of application data and asecond sequence of application data (step 751). The device identifiesthe first sequence and the second sequence from the application datastream (step 753); and determines that a combined sequence comprisingthe first sequence and second sequence matches a portion of acompression history (step 755). The device then transmits, to a seconddevice, information identifying the matched portion of the compressionhistory (step 757).

Still referring to FIG. 7D, now in greater detail, the method comprisesreceiving, by a first device, an application data stream, theapplication data stream comprising at least one application layerprotocol header between a first sequence of application data and asecond sequence of application data (step 751). The first device maycomprise any of a client, server, client agent, server agent, appliance,WAN optimization appliance, and transparent proxy. The first device mayreceive the application data stream from any of a client, server, clientagent, server agent, appliance, and WAN optimization appliance. In oneembodiment, the first device may comprise a WAN optimization appliancereceiving an application data stream from a server. In anotherembodiment, the first device may comprise a client agent receiving anapplication data stream from a client. The first device may beretransmitting some or all of the application data stream to a seconddevice. In one embodiment, the first device may be serving as atransparent proxy for a client or server from which the first device isreceiving the data.

The first device may then identify the first sequence and the secondsequence from the application data stream (step 753). The first devicemay identify the first and second sequence using any technique describedherein. In some embodiments, the first device may delay retransmittingthe application data stream while the first device is identifying thefirst and second sequence. For example, upon receiving a CIFS stream, aWAN optimization device may wait to retransmit the stream until theappliance identifies one or more sequences of a file being transmittedvia the stream so that the appliance can check for matches of the one ormore of the file sequences within a compression history.

The first device may then determine that a combined sequence comprisingthe first sequence and second sequence matches a portion of acompression history (step 755). In some embodiments, first deviceappliance may determine the match by using a fingerprinting methodand/or a compression index as a described herein. In other embodiments,the first device may use run length extension to determine the match.For example, upon finding a match to an initial part of the firstsequence of data, the first device may do a byte by byte comparison ofthe received application data stream with the matched portion of thecompression history, but omitting any application layer protocol headersfrom the byte by byte comparison. The matching portion of thecompression history may have been stored using the method described withrespect to FIG. 7C.

The first device may then transmit to a second device, informationidentifying the matched portion of the compression history (step 757).In one embodiment, information identifying the matched portion of thecompression history may comprise a chunk identifier, a chunk identifierplus an offset, and/or a memory address. The second device may thenreconstruct the application data stream using a corresponding portion ofa compression history.

As an example of the above method, the first and second devices may beWAN optimization devices serving as proxies for a transport layerconnection between a client and a server, with the first device on theserver side, and the second device on the client side. The first WANoptimization device may receive a CIFS stream comprising a file spreadout over a number of sequences separated by CIFS headers. The firstdevice identifies that the file has been previously transmitted betweenthe first and second devices by identifying the sequences of the file,and using run length expansion to match the file sequences to asequential area of the compression history of the first device. Thefirst device may then transmit a chunk identifier to the second deviceidentifying the matching portion of the compression history, along withthe CIFS headers. The second device may then access the portion of thecompression history on the second device corresponding to the chunkidentifier. The second device can then reconstruct the stream from theserver by inserting the appropriate file sequences from the compressionhistory of the second device between the CIFS headers received from thefirst appliance. The second device may then transmit the decompressedstream to the client.

G. Systems and Methods for Synchronizing Expiration of SharedCompression History Data

This section describes techniques and devices for synchronizingcompression histories shared between two devices. By maintaining aprioritized list of data portions in a compression history, and thentransmitting the number of data portions in the list to the otherdevice, two devices may maintain at least rough synchronization ofcompression history contents. This may result in the benefit of fewerinstances where a device compresses data using a reference to a dataportion not held by the recipient's compression history. This also mayallow a device to more efficiently delete unusable or unlikely to beused data portions from a compression history.

Now referring to FIGS. 8A and 8B, a method for synchronizing compressionhistories shared between two devices is shown. In brief overview, themethod comprises: storing, by a first device, a first compressionhistory, the compression history comprising a plurality of portions ofdata previously transmitted to a second device, each portion of datahaving a location identifier (step 801). The first device may thencreate an ordered list of location identifiers ordered by a time thefirst device last accessed a portion of data in a location correspondingto each identifier (step 803). The second device may then delete one ormore portions of data, and transmit the quantity of the remaining numberof portions to the first device. The first device receives, from thesecond device, information identifying a quantity of locationidentifiers of a corresponding second compression history on the seconddevice (step 805); and determines the received quantity is less than aquantity of location identifiers of the first compression history by afirst amount (step 807). The first device may then select forobsolescence, from the list of location identifiers, the first amount oflocation identifiers at an end of the ordered list corresponding toleast recently accessed portions of data (step 809). The first andsecond devices may comprise any of a client, server, client agent,server agent, appliance, WAN optimization device, and/or transparentproxy.

Still referring to FIGS. 8A and 8B, now in greater detail, the methodshown comprises: storing, by a first device, a first compressionhistory, the compression history comprising a plurality of portions ofdata previously transmitted to a second device, each portion of datahaving a location identifier (step 801). This compression history may becreated and stored by any method, including all the method describedherein. In one embodiment, the portions of data may comprise chunks 405,and the location identifiers may comprise chunk identifiers and/or chunkidentifiers and offsets. The creation of the first compression historymay be synchronized with the creation of a second compression history ona second device.

The first device may then create an ordered list of location identifiersordered by a time the first device last accessed a portion of data in alocation corresponding to each identifier (step 803). The ordered listmay comprise any data structure which allows the representation ofordering, including without limitation an array, tree, heap, or linkedlist. The ordered list may be stored in any manner, including on a disk,in memory, or in any combination. For example, a long ordered list maybe stored on a disk, with active portions of the list being transferredinto RAM.

In one embodiment, the time last accessed of a given portion of acompression history may represent the time the portion was last used tocompress a data stream. In another embodiment, the time last accessedmay represent the time the portion was created. In still anotherembodiment, the time last accessed may represent the time the portionwas last used to compress a data stream transmitted to a given device.In this embodiment, a device may maintain a separate ordered list foreach of a plurality of devices to which the device transmits compresseddata. In some embodiments, a device may also maintain a count of thenumber of location identifiers in a given ordered list.

In one embodiment, a device may maintain the ordered list by moving alocation identifier corresponding to a portion of the compressionhistory to the front of the list each time the portion of thecompression history is accessed. As the device creates a new portion ofa compression history, the device may also place the location identifierfor the new portion at the front of the list. For example, a device mayinitially create a compression history comprising data portions A, B, C,D, E, F, G, H, I, and J. The ordered list may then be J, I, H, G, F, E,D, C, B, A, reflecting the order the portions were created, with J beingthe most recent. If the device then receives and compresses datacomprising data from portion F, the device may reorder the list to F, J,I, H, G, E, D, C, B, A. If the device then creates a new portion, K, thelist may again be updated to K, F, J, I, H, G, E, D, C, B, A. If thedevice then receives and compresses data from portions C and D, the listmay again be updated to D, C, K, F, J, I, H, G, E, B, A.

The device may also maintain the ordered list by moving, to the end ofthe list a location identifier corresponding to a data portion if thedevice receives an indication that the data portion is corrupt. Thedevice may also move to the end of the list a location identifiercorresponding to a data portion if the device receives an indicationthat the data portion is no longer stored in a corresponding compressionhistory on the second device. For example, the first device may attemptto compress a data stream by replacing a given data portion with areference to an identical portion of data in the compression history.The first device may then receive an error message from the recipientindicating that the recipient does not have the data portion in itscorresponding compression history, possibly because it was deleted tomake room for more recently transmitted data portions. The first devicemay then move the location identifier corresponding to the data portionto the end of its ordered list.

The first device may receive, from the second device, informationidentifying a quantity of location identifiers of a corresponding secondcompression history on the second device (step 805). This informationmay be received by any means. In some embodiments, the information maybe received via a control protocol used between the first and seconddevices. In one embodiment, the information may be received uponestablishment and/or termination of communications with the seconddevice. For example, upon establishing of communications between two WANoptimization devices, each may transmit the total number of chunks in acompression history corresponding to the other device. In anotherembodiment, the information may be encoded within another data streamtransmitted between the two devices.

The first device may then determine the received quantity is less than aquantity of location identifiers of the first compression history by afirst amount (step 807). For example, the first device may receive anindication that the second device has a total of 1546 chunks in itscompression history corresponding to the first device. The first devicemay then identify that it has a total of 1613 chunks in its compressionhistory corresponding to the second device. In this example, thereceived quantity is less than the local quantity by 67 chunks. Adiscrepancy in chunk amounts may be caused by any factor, includingdifferences in available disk spaces, corruption of one or more dataportions, or differing software versions.

The first device may then select for obsolescence, from the list, thefirst amount of location identifiers corresponding to the least recentlyused portions of data (step 809). For example, if the first device'sordered list of chunks was the list D, C, K, F, J, I, H, G, E, B, A fromthe example above, and the first device received an indication that thesecond device only had 8 chunks in its corresponding compressionhistory, the first device may select the chunks E, B and A forobsolescence.

In some embodiments, the first device may then deactivate, delete, orotherwise remove the selected location identifiers from the orderedlist. In one embodiment, the first device may also then deactivate,delete, or otherwise remove the data portions corresponding to theselected location identifiers. In some embodiments, the first device maydeactivate a data portion from a compression history only with respectto a single device, but keep the data portion active with respect toother devices.

The above method may also be coupled with a general policy of alwaysdeleting the least recently used compression history data portions whenportions need to be deleted. For example, a WAN optimization devicelocated at a central office may be used to accelerate and compresscommunications with a number of WAN optimization devices located atbranch offices. The WAN optimization device at the central office mayrun out of disk space for compression histories before any of the branchoffice devices, since the central office device must maintain acompression history corresponding to each of the branch office devices.As the central office device transmits data to a branch office device A,the central office device may be forced to delete a number of portionsof data in one of its compression histories to make room for the newportions of data being written to the compression history. In somecases, the central office device may delete portions from thecompression history corresponding to device A. In other cases, thecentral office device may delete portions from a compression historycorresponding to a different branch office device. However, the centraldevice may choose to delete the least recently used portions of datafrom whichever compression history it chooses to delete portions from.Then, at a later time, the central device may transmit the total numberof portions remaining in the compression history from which the portionswere deleted. The device receiving the updated total number may then usethe above method to delete the least recently used portions of data,enabling the compression histories on the central and branch officedevices to be at least approximately synchronized.

H. Systems and Methods for Leveraging Shared Compression Histories andCaches Across More than Two Devices

By transmitting portions of compression histories and/or compressionhistory indexes between devices, the benefit of efficient compression ofdata previously transmitted can be extended beyond the two devicesmaking the initial transmission. To use a simple example, if device Atransfers to device B a compression history corresponding to device C,devices C and B can now communicate with the ability to compress datapreviously transmitted between C and A. The following section discussessystems and method for leveraging compression histories to providecompression between devices other than the original transmitters.

Referring now to FIG. 9A, a block diagram illustrating one embodiment ofsharing compression histories among a plurality of devices is shown. Inbrief overview, an appliance 200 c transmits data to an appliance 200 aacross a low performance network 104 b. The appliance 200 c thenreceives a request for similar data from another appliance 200 b. Asappliance 200 c receives the response to the request, the appliance maydetect a match with the data stored in the compression history that wastransmitted to appliance 200 a. Appliance 200 c then sends an indicationof the match to appliance 200 b. This indication may take the form ofcompressing the response according to the compression, and usinglocation identifiers which point to appliance 200 a. Appliance 200 b maythen request the matched data from a compression history maintained byappliance 200 a. After appliance 200 b receives the requested data fromappliance 200 a, appliance 200 a may then decompress the data receivedfrom appliance 200 a and send it to the client 102 b.

Still referring to FIG. 9A, now in greater detail, a number ofappliances 200 a, 200 b, 200 c communicate over a number of networks 104a, 104 b, 104 c. In some embodiments, the appliances may be WANoptimization devices, and network 104 b may comprise a WAN. In otherembodiments, the appliances may be serving as transparent proxies forcommunications between a number of clients 102 a, 102 b and a server106. The server may be on a LAN 104 a with the appliance 200 c. The twoappliances 200 a, 200 b may be on a LAN with the one or more clients 102a, 102 b. In one embodiment, the appliance 200 c and server 106 may belocated in a central office, and the appliances 200 a, 200 b and clients102 a 102 b may be located in one or more branch offices. Although FIG.9A depicts appliances, the systems and methods described with respect toFIG. 9A may apply equally to clients, client agents, servers, and serveragents. For example, one or more of appliances 200 a or 200 b may bereplaced in FIG. 9A by a client agent 120 executing on a client.

In the embodiment shown, the appliance 200 c transmits data from theserver 106 to the appliance 200 a. This data may be sent in the courseof responding to a request from the client 102 a for the data from theserver 106. Although FIG. 9A depicts the data as being sent from aserver, the data may come from any other source, including anotherappliance or a cache in appliance 200 c. As the data is beingtransmitted from the appliance 200 c to the appliance 200 a, the twoappliances may store copies of the data in their respective compressionhistories. In one embodiment, the appliances may store a record alongwith the stored data indicating the appliance to which the data wastransmitted. For example, the data may be stored in a chunk in thecompression history of appliance 200 c, where the chunk contains anindicator that the data in the chunk was transmitted to appliance 200 a.

Appliance 200 c may then receive a request from appliance 200 b for theserver 106. The request may originate from a client 102 b. In anotherembodiment, the request may originate from the same client 102 a as theprevious data. This embodiment may be applicable where more than one WANoptimization device is used to provide access for a given branch officeor set of clients. The appliance 200 c passes the request to the server106. In other embodiments, the appliance may pass the request to anyother computing device, or service the request using an internal cache.

As the appliance 200 c receives the response to the request from theserver 106, the appliance may detect one or more compression historymatches corresponding to the received data. The appliance may detectthese matches using any method, including any of the fingerprinting andindexing methods described herein. The appliance may then determine thatthe matches correspond to data previously transmitted to appliance 200a.

The appliance 200 c may then begin transmitting the data stream receivedfrom the server to appliance 200 b compressed according to thecompression history shared with appliance 200 a. In some embodiments,the appliance 200 c may determine that network 104 b is sufficientlylow-performance with respect to network 104 c that transmission of therequested data to appliance 200 b will be faster if it is compressedusing the compression history from appliance 200 a. In otherembodiments, the appliance 200 c may have no information about theperformance of the networks 104 b, 104 c but still transmit theindication to appliance 200 b in the hopes that the transmission will beimproved. In either of these embodiments, appliance 200 c may also begintransmitting the requested data to appliance 200 b in uncompressed formin case that appliance 200 a is unavailable or no longer has therequested data in its compression history.

Appliance 200 b, after receiving the compressed data stream, may thenrequest the indicated portions of the compression history from appliance200 a. In some cases, appliance 200 b may request a number of subsequentcompression history chunks.

After appliance 200 a receives the request for the matching portions ofcompression history, appliance 200 a may then transmit the requestedportions of data to the appliance 200 b. In one embodiment, appliance200 b may then store the received portions in compression history usedto accelerate communications between appliance 200 b and appliance 200c.

In another embodiment, rather than sending a compressed data streamdirectly to appliance 200 b, appliance 200 c may transmit a request toappliance 200 a to serve as an intermediary for the connection betweenappliance 200 c and appliance 200 b. Appliance 200 c may then begintransmitting the requested data stream to 200 a, using the previouscompression history to accelerate the transmission. Appliance 200 a maythen forward the data stream to appliance 200 b.

Now referring to FIG. 9B, a flow diagram of one embodiment of a methodfor sharing compression histories among a plurality of devices toimprove compression of data transmitted via a plurality of connectionsis shown. In brief overview, a first device transmits, to a seconddevice, a first data stream, the first data stream compressed accordingto a first compression history shared between the first device and thesecond device (step 901). The first device may receive, from the thirddevice, an indication that a third device is located on the same networkas the second device. The first device receives a second data streamintended for the third device (step 903). The first device identifiesthat a portion of the data stream matches within a predeterminedthreshold a portion of the first compression history (step 905); andtransmits, to the third device, information identifying the portion ofthe first compression history (step 907). The first, second and thirddevices may be any of a client, server, client agent, server agent,appliance, WAN optimization device, and/or transparent proxy. In oneembodiment, this method may reflect steps performed by the appliance 200c in FIG. 9A.

Still referring to FIG. 9B, now in greater detail, the method comprisestransmitting, between a first device and a second device, a first datastream, the first data stream compressed according to a firstcompression history shared between the first device and the seconddevice (step 901). In one embodiment, the data stream may be transmittedfrom the first appliance to the second appliance. In another embodiment,the data stream may be transmitted from the second appliance to thefirst appliance. The data stream is compressed according to acompression history shared by the first and second devices. Thiscompression may be performed by any manner, including any describedherein, and the compression history may comprise any compressionhistory, including any compression history described herein. In oneembodiment, the shared compression history may already contain one ormore data portions contained in the first data stream. In some cases,the data may transmitted uncompressed if no matches are found for thedata in the shared compression history. The shared compression historymay be updated to include one or more data portions contained in thefirst data stream not already in the first compression history.

The first device may receive an indication that a third device is on thesame network as the second device in any manner (step 902). The firstdevice may receive the indication from any source. In some embodiments,the first device may receive the indication from the second or thirddevice. In other embodiments, the first device may receive theindication from another device. In still other embodiments, the firstdevice may be manually configured with the indication.

In one embodiment, upon establishing a connection between two devices,each device may send the other information identifying one or more otherdevices on the same network. For example, on startup, an appliance mayautomatically discover, using any network techniques, other appliancesresiding on a LAN or otherwise clustered with the appliance. Eachappliance may, on startup, identify the other appliances located in thesame cluster.

In one embodiment, appliances in the same cluster may exchangeinformation identifying a range of chunk identifiers corresponding tocompression history portions held by each device. In another embodiment,appliances in a cluster may exchange information identifying the disksheld by each appliance. In this manner, each appliance in a cluster maybe able to identify whether a given location identifier or chunkidentifier corresponds to a compression history located on anotherappliance in the cluster. For example, in the case where chunkidentifiers are created by appending a serial number to a globallyunique disk identifier, each appliance may send to other appliances in acluster the identifier for each disk of the appliance and a rangespecifying valid serial numbers for each disk identifier. In thismanner, when an appliance in a cluster receives a chunk identifier, theappliance may be able to check the disk identifier contained within thechunk identifier to determine whether the disk is held by an appliancein the cluster.

After this discovery step, when the appliance establishes a connectionwith any other appliance or client agent, the appliance may transmit alist of the appliances locally clustered with the appliance. Theappliance may also receive, upon establishing the connection, a list ofappliances or client agents on a LAN or otherwise clustered with theconnection recipient. In this manner, each appliance or client agent incommunication with another appliance or client agent may know theidentities of any other appliances or client agents local to the otherappliance or client agent. In other embodiments, any or all of thisdiscovery of clustered devices may be accomplished via manualconfiguration.

To give a detailed example, a central office may use a cluster of WANoptimization appliances to communicate with a number of branch offices,each branch office also having a cluster of WAN optimization devices.When an appliance from the central office establishes a connection withan appliance at a branch office, the central office appliance maytransmit to the branch office appliance information identifying theother appliances located in the central office cluster. The branchoffice appliance may also transmit to the central office applianceinformation identifying the other appliances located in the branchoffice cluster. Along with this identifying information, the appliancesmay exchange any other information relating to other appliances in theirrespective clusters, including IP addresses, capacity, performance, diskidentifiers, and configuration information.

The method shown then comprises receiving, by a first device, a datastream intended for the third device (step 903). The first device mayreceive the data stream from any source, including a client 102, server106 or client agent 120. In one embodiment, the data stream may comprisea response from a server 106 to a client request. For example, the firstdevice may be serving as a transparent proxy to a TCP connection betweena client and a server, and the data stream may comprise a response to anHTTP request by the client. Or, for example, the data stream maycomprise an ICA stream from an application server to a client agent.

The first device then identifies that a portion of the data streammatches a portion of the first compression history (step 905). The firstdevice may identify the matching using any technique, including any ofthe fingerprinting and indexing techniques described herein. In oneembodiment, the first device may identify that one or more shingles ofthe data stream match portions of chunks stored in the first compressionhistory. For example, a chunk comprising the matched portion may have aheader indicating that the data was sent to the second device. Or forexample, a compression index entry may indicate that the matchingportion of data was transmitted to the second device. After determiningthat the matched portion of data is held by a compression history notshared with the intended recipient, the first device may determine thatthe matched portion of data is held by a compression history shared withan appliance or other device in a cluster with the intended recipient.

In one embodiment, the first device may determine that a portion of thedata stream matches within a predetermined threshold a portion of thefirst compression history. The predetermined threshold may comprise anyamount, percentage, or distribution of data. In one embodiment, thepredetermined threshold may comprise a minimum number of bytes. Forexample, the first device may identify that at least 64 bytes of thedata stream matches a portion of the first compression history. Aminimum number of bytes may be any number of bytes, including 4, 8, 16,32, 64, 128, 256, 512, 1024, 2048, and 3072 bytes. In some embodiments,the predetermined threshold may require that a minimum number ofmatching bytes be sequential. In other embodiments, the predeterminedthreshold may require that a minimum number of matching bytes be foundat a given distribution throughout the data stream. For example, apredetermined threshold might require that at least 50 out of threeconsecutive 100 byte sequences match. Or a predetermined threshold mightrequire that at least three different matching sequences of at least 64bytes be found. In some embodiments, the predetermined threshold mayrequire that the matching portions of the compression history aresequential. For example, the predetermined threshold may require that asequence of at least 128 bytes matches a consecutive sequence of 128bytes in the first compression history. In some embodiments, the firstdevice may use a technique such as the ones described with respect toFIGS. 5B and 6B to efficiently determine the existence of any longsequential matches. In still other embodiments, the predeterminedthreshold may require that a certain percentage of the data streammatches data in the first compression history. For example, thepredetermined threshold may require that 85% of a first number of bytesof the data stream match the first compression history.

In one embodiment, the predetermined threshold may be set automaticallyby the first device. In other embodiments, the predetermined thresholdmay be manually configured. In some embodiments, the predeterminedthreshold may be calibrated to take into account the potential overheadof using compression history chunks not held by the destination device,but rather the result of a successful transfer of compression historydata. For example, the predetermined threshold may be lowered inresponse to slower performance of the network 104 b. Or thepredetermined threshold may be raised as the performance of the networkconnecting the first device to the second and third devices becomesfaster. In another example, the predetermined threshold may be lower ifthe bandwidth of the connection between the first and third devices issubstantially lower than the bandwidth of the connection between thesecond and third devices. In some embodiments, the predeterminedthreshold may comprise the same threshold for compression using acompression history shared with the intended recipient of the datastream. In other embodiments, the predetermined threshold may be higherfor cases in which the matching portion or portions are not held by theintended recipient, but instead held by a device clustered with theintended recipient of the data stream.

The first device may then transmit, to the third device, informationidentifying the matching portion of the first compression history (step907). In one embodiment, this step may comprise transmitting the datastream to the third device compressed according to the matching portionsof the first compression history. The first device may perform thiscompression according to the matching portions of the first compressionhistory in any manner. In one embodiment, the first device may replaceportions of the data stream with location identifiers identifying thematching portions of the first compression history. In this embodiment,the first device may also compress the data stream using any othertechniques, including without limitation additionally compressing thedata stream according to a second compression history shared between thefirst device and third device. In one embodiment, this step may comprisetransmitting one or more chunk identifiers to the third device. Inanother embodiment, this step may comprise transmitting one or morelocation identifiers to the third device. In one embodiment, the firstdevice may also transmit information identifying the second device.

In one embodiment, the first device may also include locationidentifiers of one or more portions of the first compression historythat are subsequent to the identified matching portions. The firstdevice may include these portions based on a speculation that thesubsequent portions will also match subsequent portions of the seconddata stream. In some embodiments, the number of subsequent portions thefirst device identifies may be determined by the quality or quantity ofthe found matches.

After the third device receives the data stream compressed according tothe first compression history, the third device may transmit, to thesecond device, a request for the identified portions of the firstcompression history. These portions may then be transmitted from thesecond device to the third device using any means and any protocol. Insome embodiments, the third device may then signal to the first devicethat it has received one or more portions of the compression history. Inother embodiments, the third device may transmit an indication to thefirst device that the identified portions of the compression historycannot be obtained, which may occur if the second device is inoperableor busy. In these cases, the first device may then retransmit the datastream to the third device without compressing it according to the firstcompression history.

Referring now to FIG. 9C, a flow diagram of a second embodiment of amethod for sharing compression histories among a plurality of devices toimprove compression of data transmitted via a plurality of connectionsis shown. In brief overview, the method comprises transmitting, betweena first device and a second device, a first data stream, the first datastream compressed according to a first compression history sharedbetween the first device and the second device (step 911). The firstdevice receives information identifying a third device and a portion ofthe first compression history (step 913) and transmits, to the thirddevice, the identified portion of the first compression history (step915). The first, second and third devices may be any of a client,server, client agent, server agent, appliance, WAN optimization device,and/or transparent proxy. In one embodiment, this method may reflectsteps performed by the appliance 200 a in FIG. 9A.

Still referring to FIG. 9C, now in greater detail, the method comprisestransmitting, between a first device and a second device, a first datastream, the first data stream compressed according to a firstcompression history shared between the first device and the seconddevice (step 911). This step may correspond to step 901 of the previousmethod, and may be performed according to any of the embodimentsdiscussed herein. The first device may be either the sender or therecipient of the first data stream.

The first device may then receive, from a third device, informationidentifying a portion of the first compression history (step 913). Insome embodiments, the received information may comprise any of theinformation transmitted according to step 907 of the previouslydiscussed method. In one embodiment, the information may also comprise arequest to transmit the identified portion to the third device. Inanother embodiment, the information may identify a plurality of portionsof the first compression history to transmit to the third device. Inanother embodiment, the first device may receive a number of chunkidentifiers. In still another embodiment, the first device may receive alocation identifier and a byte count indicating a number of bytesfollowing the location identifier to transmit to the third device.

In some embodiments, the first device may receive a plurality oftransmissions from the third device with information identifying a thirddevice and a portion of the first compression history. For example, thesecond device may be transmitting a long data stream to the thirddevice, and continually be identifying portions of the data stream whichmatch portions of the first compression history and compressing thestream accordingly. As the third device receives each locationidentifier in the place of data from the data stream, the third devicemay request the identified portion or portions of the first compressionhistory from the first device. The third device may then reconstruct thedata stream using the requested portions of the first compressionhistory.

The second device may then transmit, to the third device, the identifiedportions of the first compression history (step 915). The second devicemay transmit these portions of the first compression history using anyprotocol or protocols. In some embodiments, the second device maytransmit a plurality of identified portions at once. In otherembodiments, the second device may transmit a plurality of identifiedportions in a sequence.

Referring now to FIG. 9D, a flow diagram of a third embodiment of amethod for sharing compression histories among a plurality of devices toimprove compression of data transmitted via a plurality of connectionsis shown. In brief overview, the method comprises a first devicereceiving, by a first device from a second device, a data stream, thedata stream compressed according to a compression history shared betweenthe first device and a third device (step 921). The first deviceidentifies the third device (step 923) and transmits, to the thirddevice, a request for a portion of the compression history (step 925).The first device receives, from the third device, the requested portionof the compression history (step 927). The first device may thendecompress the data stream (step 929) and transmit the decompressedstream to the client (step 931). The first, second and third devices maybe any of a client, server, client agent, server agent, appliance, WANoptimization device, and/or transparent proxy. In one embodiment, thismethod may reflect steps performed by the appliance 200 b in FIG. 9A.

Still referring to FIG. 9D, now in greater detail, a first devicereceives, from a second device, a data stream, the data streamcompressed according to a compression history shared between the firstdevice and a third device (step 921). This step may be performedaccording to any embodiment described herein. In some embodiments, thisstep may correspond to receiving a compressed data stream transmittedaccording to step 907 of the method in FIG. 9B. In one embodiment, thefirst device may receive a data stream comprising a number of locationidentifiers, where the location identifiers identify portions of data tobe inserted into the data stream.

The first device may identify the third device in any manner (step 923).In one embodiment, the third device may be on a LAN or otherwiseclustered with the first device. The first device may use any of thediscovery techniques and clustering techniques described herein toidentify the third device. In some embodiments, the first device mayidentify the third device by determining a disk identifier included in achunk identifier in the data stream corresponds to a disk held by thethird device. In another embodiment, the first device may determine thata location identifier contained in the data stream falls within a rangeof location identifiers advertised by the third device.

The first device may then transmit, to the third device, a request for aportion of the compression history (step 925). The request may betransmitted via any protocol or protocols. In some embodiments, therequest may request a plurality of portions of the compression history.In some embodiments, the first device may transmit a separate requestfor each of a number of identifiers received in the data stream. Inanother embodiment, the first device may include more than oneidentifier in a single request. In some embodiments, the first devicemay request one or more portions of the compression history subsequentto the identified portions. For example, if the first device receives adata stream comprising a chunk identifier identifying a chunk held bythe third device, the first device may transmit to the third device arequest for the identified chunk as well as one or more subsequentchunks. This may be based on a likelihood that subsequent matches willoccur and include the subsequent chunks. Or, for example, if the firstdevice receives a data stream comprising a location identifieridentifying 212 bytes of a chunk held by the third device, the firstdevice may transmit to the third device a request for the identifiedbytes as well as a number of subsequent bytes from the chunk. The numberof subsequent bytes requested may be determined in any manner, includingwithout limitation based on a number or length of previous matches.

The first device may then receive, from a third device, the requestedportion of the compression history (step 927). The portion may bereceived via any protocol or protocols. In one embodiment, the portionmay be received as a result of the third device performing step 915 ofthe previously described method. In some embodiments, the first devicemay receive a plurality of portions of the compression history. In someembodiments, the first device may receive entire chunks of thecompression history. For example, in response to a request for 514 bytesof a chunk, the first appliance may receive the entire chunk containingthe requested bytes. In other embodiments, the first device may receivea portion of a chunk. The first device may also receive any additionalinformation with the requested portion of the compression history,including without limitation any information contained in a chunk headeror compression index corresponding to the requested portion.

In some embodiments, after receiving the requested portion of thecompression history, the first device may then insert the portion of thesecond compression history into one or more compression histories on thefirst device (step 925). This insertion may be done by any means. Insome embodiments, this step may comprise incorporating one or morechunks received from the third device into the a compression historyshared with the second device. In one embodiment, the insertion may bedone temporarily, and the chunks may be removed or deactivated aftercompletion of their use. In another embodiment, the insertion may besuch that the portions are incorporated into the first compressionhistory as though they had been created in the normal course oftransmitting data to or from the second device.

In some embodiments, the first device may transmit an indication to thesecond device upon successfully receiving the portion from the thirddevice. This indication may serve to notify the second device that itmay begin or continue compressing the second data stream according tothe portions of the second compression. In some embodiments, the firstdevice may transmit an indication to the second device if the requestedportions were not received from the third device. This indication mayserver to instruct the second device to not use portions of data fromthe compression history to compress the data stream. The second devicemay also, in response to the indication, retransmit one or more portionsof the data stream.

After receiving, the requested portion of the compression history, thefirst device may decompress the received data stream (step 927). Thisdecompression may be done in any manner. In one embodiment, the firstdevice may replace a number of location identifiers with portions ofdata identified by the location identifiers. The first device may useany number of decompression methods. For example, the first device mayfirst decompress the data stream using a run-length decompressionmethod, and then decompress the data stream further by using thereceived portions of compression history data. In some embodiments, thefirst device may also use portions of data from a locally storedcompression history to decompress the data stream.

After decompressing the data stream, the first device may transmit thedata stream to a client (step 929). In other embodiments, the firstdevice may transmit the data stream to any other device, including aclient, server, or appliance.

In some embodiments, the method described can be applied continuouslyover the course of servicing one or more requests. For example, a clientat a branch office may be accessing a number of applications from anapplication server at a central office using ICA. The branch office andcentral office may each have clusters of WAN optimization appliances200. The ICA connection may be proxied through a first central officeappliance and a first branch office appliance. As data from theapplication server is transmitted through the central office WANappliance, the central office appliance may determine that portions ofthe data have previously been sent to a second branch office WANoptimization appliance in the cluster with the first branch officeappliance. The central office appliance may compress the data as it ispassing through using references to the compression history portionsshared with the second branch office device. As each reference in thecompressed data stream is received by the first branch office appliance,it may send a request for the referenced data. As each piece ofreferenced data is received, the first branch office appliance may usethe received data to reconstruct a portion data stream and forward theportion of the reconstructed data stream to the client.

Now referring to FIG. 10A, a block diagram of one embodiment of a systemfor sharing compression history indexes to accelerate data transmissionbetween two groups of devices is shown. In brief overview, a first datastream is transmitted between appliance 200 c and appliance 200 a, eachappliance storing portions of the data stream in their respectivecompression histories. Appliance 200 a then shares a compression index,containing entries corresponding to the transmitted first data stream,with appliance 200 d. Appliance 200 d, in the course of transmitting asecond data stream to appliance 200 b, may identify one or more matchescorresponding to the index received from appliance 200 c. Appliance 200d may then take steps to leverage the existing compression histories onappliance 200 c and 200 a to accelerate the transmission. In theembodiment shown, the appliance 200 d requests the correspondingportions of the compression history from appliance 200 c, and sends anindication of the match to appliance 200 b by compressing the seconddata stream using references to the compression history shared byappliances 200 a and 200 c. Appliance 200 b, upon receiving thecompressed stream, may then request the corresponding portions of thecompression history from appliance 200 a to decompress the data stream.

Still referring to FIG. 10A, now in greater detail, a number ofappliances 200 a, 200 b, 200 c, 200 d communicate over a number ofnetworks 104 a, 104 b, 104 c. In some embodiments, the appliances may beWAN optimization devices, and network 104 b may comprise a WAN. In otherembodiments, the appliances may be serving as transparent proxies forcommunications between a number of clients 102 a, 102 b and a server106. The server may be on a LAN 104 a with the appliance 200 c. The twoappliances 200 a, 200 b may be on a LAN with the one or more clients 102a, 102 b. In one embodiment, the appliances 200 c, 200 d and server 106may be located in a central office, and the appliances 200 a, 200 b andclients 102 a 102 b may be located in one or more branch offices.Although FIG. 10A depicts appliances, the systems and methods describedwith respect to FIG. 10A may apply equally to clients, client agents,servers, and server agents.

In the embodiment shown, appliance 200 c sends data from server 106 tothe appliance 200 a. In some cases, this may be a file or other datarequested from the server 106 by the client 102 a. In these cases, theappliances 200 c, 200 a may be serving as transparent proxies for thecommunication. As the data is transmitted, the appliances 200 a, 200 cmay be storing data from the transmission in their respectivecompression histories, and storing information relating to the data in acompression index.

The appliance 200 c may then transmit some or all of its compressionindex to the appliance 200 d. Appliance 200 d may also transmit some orall of its compression index to appliance 200 c. In some embodiments,the appliances 200 c, 200 d may be part of an appliance clustercontaining two or more devices, all of which transmit portions of theircompression indexes to each other. The appliances may be clustered inany way, and may discover each other using any technique. In this way,any appliance in the cluster may be able to determine if a data streamthe appliance is transmitting contains a number of matches to a datastream previously transmitted by any of the other appliances in thecluster. Devices in a cluster may exchange compression indexes using anymethod. In some embodiments, devices may periodically transmit updatesof their compression history indexes to other devices in the cluster. Inother embodiments, devices may transmit portions of their compressionhistory to other devices in cluster upon startup, or upon detecting anew device in the cluster. In some embodiments, devices may transmitonly a portion of a compression history index to another device in acluster. In other embodiments, devices may only transmit entries of acompression index corresponding to frequently or recently used portionsof a compression history.

After receiving the compression index from appliance 200 c, appliance200 d may integrate the received compression index with one or morecompression indexes maintained by appliance 200 d. In some embodiments,the appliance 200 d may mark the index entries received from appliance200 c to indicate that the index entries correspond to appliance 200 c.

Sharing compression history indexes among a cluster of devices may beuseful in situations where a cluster of appliances is providingacceleration to a server, and in those situations where the sameappliance does not always provide acceleration for the same server inthe set. In some ways, the system in FIG. 10A and the method shown inFIG. 10B may be a variation of the systems and methods shown in FIGS.9A-9D.

Appliance 200 d may then receive a data stream from a server 106destined for client 102 b via appliance 200 b. Appliance 200 d maydetermine that one or more portions of this data stream match portionsof the compression index received from appliance 200 c. Afteridentifying the matched portions, appliance 200 d may send a request forthe matching portions to appliance 200 c. Appliance 200 c may respond bytransmitting the requested portions, along with information identifyingthe appliance 200 a which may also have the requested portions of data.

After receiving the matching portions from appliance 200 c, appliance200 d may determine whether the portions actually match the data stream.This may be necessary in cases where the compression index onlycomprises fingerprints of data, and thus byte-by-byte comparison of thereceived portions with the data stream may be necessary to confirm amatch. Once a match is confirmed, appliance 200 d may send an indicationof the match to appliance 200 b and replace one or more portions of thedata stream with references to the matched portions of compressionhistory. Appliance 200 b may then request the matching portions of datafrom appliance 200 a.

Appliance 200 b, having similarly received corresponding portions of thecompression history from appliance 200 a, may then decompress the datastream and transmit the data stream to the client 102 b.

Referring now to FIG. 10B, a flow diagram of a method for sharingcompression indexes among a plurality of devices to improve compressionof data transmitted via a plurality of connections is shown. In briefoverview, the method comprises: receiving, by a first device from asecond device, an index of entries for a compression history sharedbetween the second device and a third device; each index entrycomprising a location identifier of data stored in the second device(step 1001). The first device receives a data stream intended for afourth device (step 1003); and identifies that a portion of the datastream matches an entry of the received index (step 1005). The firstdevice transmits, to the second device, a location identifiercorresponding to the matched entry (step 1007). The first devicereceives, from the second device, a portion of the compression historycorresponding to the location identifier (step 1009); and determines theportion of the compression history matches a portion of the data stream(step 1011). The first device may then transmit, to the fourth device,information identifying the portion of the compression history (step1013). The first, second, third, and fourth devices may be any of aclient, server, client agent, server agent, appliance, WAN optimizationdevice, and/or transparent proxy. In one embodiment, this method mayreflect steps performed by the appliances in FIG. 10A wherein the firstdevice is the appliance 200 d, the second device is the appliance 200 c,the third device is the appliance 200 a, and the fourth device is theappliance 200 b.

Still referring to FIG. 10B, now in greater detail, the method comprisesreceiving, by a first device from a second device, an index of entriesfor a compression history shared between the second device and a thirddevice; each index entry comprising a location identifier of data storedin the second device (step 1001) The received index may comprise anytype of index for the first compression history. In one embodiment, theindex may comprise a compression index 410. The received index maycomprise the entirety of the index for the first compression history, orthe received index may comprise only a portion of the index for thefirst compression history. In some embodiments, the index may comprise aspecifically selected portion of the index for the first compressionhistory. In other embodiments, the index may comprise entries from aplurality of compression histories. In some embodiments, the firstdevice may receive the index of entries after detecting that the seconddevice is in a cluster with the first device. In other embodiments, thefirst device may periodically receive a number of index entries from thesecond device. The first device may also receive any other informationfrom the second device, including a range of valid location identifiersand/or one or more disk identifiers of disks operated by the seconddevice.

In some embodiments, the received index entries may be integrated intoan existing compression index on the first device. For example, thereceived index may have been created using a same fingerprint methodused by the third device, and the entry numbers may correspond to entrynumbers in a compression index of the third device. In one embodiment,the third device may mark or otherwise note the entries that have beenreceived from the first device. In another embodiment, the locationidentifiers within the received index entries may point to locationsknown to be on the first device.

In some embodiments, each device in a group of devices may periodicallytransmit updated compression indexes to the other devices in the group.In this way, a cluster of devices may be created in which allessentially or partially share the same compression index. This mayallow any individual device to leverage previous transmissions of databy any of the other devices to accelerate future communications. Forexample, a group of devices may provide WAN optimization services for acentral office to a number of branch offices. Each device in the centraloffice may periodically transmit some or all of its compression index tothe other central office devices. In this way, each device at thecentral office may be able to leverage previous transmissions to abranch office to compress future transmissions to the branch office,even if the previous transmission was from a different central officedevice, and to a different branch office device or client.

The first device, may then receive a data stream intended for a fourthdevice (step 1003). The first device may receive the data stream fromany source, including a client 102, server 106 or client agent 120. Inone embodiment, the data stream may comprise a response from a server106 to a client request. For example, the first device may be serving asa transparent proxy to a TCP connection between a client and a server,and the data stream may comprise a response to an HTTP request by theclient. Or, for example, the data stream may comprise an ICA stream froman application server to a client agent.

The first device may identify that a portion of the data stream matchesan entry of the received index (step 1005). In some embodiments, thefirst device may identify that a portion of the data stream matches anentry of the received index before any data is transmitted to the fourthdevice. In other embodiments, the third device may identify that aportion of the data stream matches an entry of the received index aftersome data has already been transmitted to the fourth device. The firstdevice may identify the matching using any technique, including any ofthe fingerprinting and indexing techniques described herein. In oneembodiment, the first device may identify that one or more shingles ofthe data stream have fingerprints corresponding to an entry in thereceived index.

In some embodiments, the first device may identify that a portion of thesecond data stream matches within a predetermined threshold a portion ofthe received index. The predetermined threshold may comprise any amount,percentage, or distribution of data. In one embodiment, thepredetermined threshold may comprise a minimum number of bytes. Forexample, the third device may identify that at least 64 bytes of thesecond data stream matches entries in the received index. A minimumnumber of bytes may be any number of bytes, including 4, 8, 16, 32, 64,128, 256, 512, 1024, 2048, and 3072 bytes. In some embodiments, thepredetermined threshold may require that a minimum number of matchingbytes be sequential. In other embodiments, the predetermined thresholdmay require that a minimum number of matching bytes be found at a givendistribution throughout the second data stream. For example, apredetermined threshold might require that at least 50 matching bytesequences be found in at least three different locations in the seconddata stream. Or a predetermined threshold might require that at leastthree different matching sequences of at least 64 bytes be found. Insome embodiments, the predetermined threshold may require that thematching index entries have location identifiers corresponding tosequential portions of the first compression history. For example, thepredetermined threshold may require that a sequence of at least 128bytes matches index entries identifying a consecutive sequence of 128bytes in the first compression history. In some embodiments, the thirddevice may use a technique such as the ones described with respect toFIGS. 5B and 6B to efficiently determine the existence of any longsequential matches. In still other embodiments, the predeterminedthreshold may require that a certain percentage of the second datastream matches received index entries. For example, the predeterminedthreshold may require that 85% of a first number of bytes of the seconddata stream match received index entries.

The predetermined threshold may be set either automatically by the firstdevice or manually configured. In some embodiments, the predeterminedthreshold may be calibrated to balance the overhead of contacting thefirst device and subsequently transferring portions of a compressionhistory against the potential increased in transmission speed as theresult of a successful transfer of compression history data. Forexample, the predetermined threshold may be lowered in response toslower performance of the network 104 b. Or the predetermined thresholdmay be raised as the performance of the network 104 b becomes faster. Inanother example, the predetermined threshold may be lower if thebandwidth of the connection between the first and third devices issubstantially higher than the bandwidth of the connection between thethird and fourth devices.

After identifying a match, the first device may transmit, to the seconddevice, a location identifier corresponding to the matched entry (step1009). In one embodiment, the first device may transmit one or morechunk identifiers to the second device. In another embodiment, the firstdevice may transmit a plurality of location and/or chunk identifiers tothe second device. These portions may then be transmitted from thesecond device to the first device using any means and any protocol. Insome embodiments, the first device may then signal to the first devicethat it has successfully received the requested one or more portions ofthe compression history.

In one embodiment, the first device may transmit a request for thesecond device to send the identified portion of the first compressionhistory to the first device. The request may be transmitted via anyprotocol or protocols. In some embodiments, the request may request aplurality of portions of the compression history. In some embodiments,the first device may transmit a separate request for each of a number ofidentifiers received in the data stream. In another embodiment, thefirst device may include more than one identifier in a single request.In some embodiments, the first device may request one or more portionsof the compression history subsequent to the identified portions. Forexample, if the first device receives a data stream comprising a portionof data matching an index entry received from the second device, thefirst device may transmit to the second device a request for anidentified chunk as well as one or more subsequent chunks. This may bebased on a likelihood that subsequent matches will occur and include thesubsequent chunks. Or, for example, if 212 bytes of a data stream matchan index entry identifying a chunk held by the second device, the firstdevice may transmit to the second device a request for the identifiedbytes as well as a number of subsequent bytes from the chunk. The numberof subsequent bytes requested may be determined in any manner, includingwithout limitation based on a number or length of previous matches.

The first device may receive, from the second device, a portion of thecompression history corresponding to the location identifier in anymanner (step 1011). The portion may be received via any protocol orprotocols. In some embodiments, the first device may receive a pluralityof portions of the compression history. In some embodiments, the firstdevice may receive entire chunks of the compression history. Forexample, in response to a request for 514 bytes of a chunk, the firstappliance may receive the entire chunk containing the requested bytes.In other embodiments, the first device may receive a portion of a chunk.The first device may also receive any additional information with therequested portion of the compression history, including withoutlimitation any information contained in a chunk header or compressionindex corresponding to the requested portion. In some embodiments, thefirst device may receive information identifying other devices whichalso may have the chunk. In these embodiments, the first device may thendetermine whether one of the other devices having the chunk is locatedin a cluster or otherwise local to the fourth device.

The first device may then determine the portion of the compressionhistory matches a portion of the data stream (step 1011). This step maybe used in embodiments where the an index match does not guarantee thatdata in the compression history will also match. For example, if theindex is implemented using a non-unique fingerprinting method, twodistinct shingles may have the same fingerprint. A comparison to thereferenced data portion in the compression history may be needed toverify that a match exists. In other embodiments, this step may beomitted.

The first device may then transmit to the fourth device, informationidentifying the portion of the compression history (step 1013). In oneembodiment, this step may comprise transmitting the data stream to thefourth device compressed according to the matching portions of the firstcompression history. The first device may perform this compressionaccording to the matching portions of the first compression history inany manner. In one embodiment, the first device may replace portions ofthe data stream with location identifiers identifying the matchingportions of the first compression history. In this embodiment, the firstdevice may also compress the data stream using any other techniques,including without limitation additionally compressing the data streamaccording to a second compression history shared between the firstdevice and third device. In one embodiment, this step may comprisetransmitting one or more chunk identifiers to the fourth device. Inanother embodiment, this step may comprise transmitting one or morelocation identifiers to the fourth device. In one embodiment, the firstdevice may also transmit information identifying the third device.

In one embodiment, the first device may also include locationidentifiers of one or more portions of the compression history that aresubsequent to the identified matching portions. The first device mayinclude these portions based on a speculation that the subsequentportions will also match subsequent portions of the second data stream.In some embodiments, the number of subsequent portions the first deviceidentifies may be determined by the quality or quantity of foundmatches.

After the fourth device receives the data stream compressed according tothe first compression history, the fourth device may decompress the datastream in any manner. In some embodiments, the fourth device maydecompress the data stream using any of the techniques described withrespect to steps 921-931 in FIG. 9D. In one embodiments, the fourthdevice may transmit, to the third device, a request for the identifiedportions of the first compression history. These portions may then betransmitted from the third device to the second device using any meansand any protocol. In some embodiments, the fourth device may then signalto the first device that it has received one or more portions of thecompression history. In other embodiments, the fourth device maytransmit an indication to the first device that the identified portionsof the compression history cannot be obtained, which may occur if thesecond device is inoperable or busy. In these cases, the first devicemay then retransmit the data stream to the third device withoutcompressing it according to the first compression history.

I. Systems and Methods for Ad-Hoc Cache Hierarchies.

Now referring to FIG. 11A, a block diagram illustrating one embodimentof providing an ad-hoc hierarchy of caches to serve objects is shown. Inbrief overview, an appliance 200 a intercepts a request for an objectfrom a client to a server. The appliance 200 a, after finding that theobject is not in a local cache, transmits a request to the server forthe object. Appliance 200 a also transmits a number of duplicaterequests to devices which may have a cached copy of the object. Thesedevices may include a client agent 120, an appliance 200 b, or any otherdevice. Appliance 200 a may then receive the object from any of thesources to which requests were sent. The appliance 200 a may then sendthe object to the client from the first responder.

Still referring to FIG. 11A, now in greater detail, appliances 200 a 200b, and client 102 a and 102 b reside on a network 104 a. In someembodiments, the appliances 200 a 200 b may be WAN optimization devices,and network 104 b may comprise a WAN. In other embodiments, any of theappliances may comprise a proxy server, proxy cache, SSL/VPN appliance,firewall, and/or transparent proxy. In some embodiments, the appliancesmay be serving as transparent proxies for communications between anumber of clients 102 a, 102 b and a server 106. In some embodiments,the network 104 a may comprise a LAN. The two appliances 200 a, 200 bmay be on a LAN with the one or more clients 102 a, 102 b. In oneembodiment the appliances 200 a, 200 b and clients 102 a, 102 b may belocated in one or more branch offices, and the server 106 may be locatedin a central office. In another embodiment, there may be one or moreappliances on network 104 c intercepting traffic for the server 106.Although FIG. 11A depicts an appliances 200 a, the systems and methodsdescribed with respect to FIG. 11A may apply equally with a client agent120 executing on the client 102 a performing the functions of appliance200 a.

In the embodiment shown, the appliances 200 a, 200 b and the client 102b may each contain a cache of objects previously transmitted through theappliance. A cache may comprise any type and form of storage, includingwithout limitation storage on memory or disks. A data object maycomprise any discrete sequence of data. Examples of data objectsinclude, without limitation, files, images, executables, web pages,audio files, and video files. In one embodiment, data objects may bestored in a cache on an appliance along with an index of a name of eachof the data objects. For example, an appliance may maintain a cache offiles or portions of files transmitted through the appliance via CIFS,and may keep an index of the file names such that, in response toreceiving a request for a given named object, the appliance can retrievethe object of that name from the cache. In another embodiment, dataobjects may be stored with any other identifiers, including withoutlimitation location identifiers, chunk identifiers, and fingerprints.

In some embodiments, a cache may be integrated with a compressionhistory. For example, an appliance may keep an index of named objectsthat have been transmitted via the appliance, where the index containspointers to a portion or portions of a compression history containingthe named object. In one embodiment, an appliance may keep an indexwhich matches names of objects to chunk identifiers and offsetsidentifying the locations of the named objects. In other embodiments, acache may be maintained separately from one or more compressionhistories.

The system shown may be used to create an ad-hoc cache hierarchy. Sincethe requests sent to the devices which may have cached the object may besent in parallel to the request to the server, the system may not resultin additional latency penalties if any of the devices do not have theobject cached. The system may be used in cases where the appliance 200 ais not certain whether an object exists in the cache of another device,or is not certain another device is available.

Referring now to FIG. 11B, a flow diagram illustrating one embodiment ofa method for providing an ad-hoc hierarchy of caches to serve objects isshown. In brief overview, the method comprises receiving, by anappliance from a client, a first request for an object from a server(step 1101). The first device identifies that the object is not locatedin a first cache of the appliance (step 1103) and forward the firstrequest for the object to the server (step 1105). The appliancetransmits, prior to receiving a response to the forwarded request, asecond request for the object to a second device (step 1107). Theappliance receives, from at least one of the server or the seconddevice, the object (step 1109); and then transmits the object to theclient (step 1111). In some embodiments, the first appliances may be anyof a client, server, client agent, server agent, appliance, WANoptimization device, and/or transparent proxy. In one embodiment, thismethod may reflect steps performed by the appliance 200 a in FIG. 11A.

Still referring to FIG. 11B, now in greater detail, the method comprisesreceiving, by an appliance, a first request from a client to a serverfor an object (step 1101). In some embodiments, the first appliance mayintercept the first request transparently to one or more of the client,the server, a client agent, server agent, or an intermediate appliance.The first request may comprise a request transmitted via any protocol,and may be received in any manner. Examples of requests for an objectinclude without limitation HTTP requests for files, FTP requests forfiles, CIFS requests for some or all of a file, NFS requests for some orall of a file, and ICA requests for one or more application objects. Inone embodiment, the appliance may intercept, at the transport layer, arequest for an application layer object. In another embodiment, theappliance may intercept, at the network layer, a request for anapplication layer object. In some embodiments, the request may betransmitted via a TCP connection the appliance is serving as anintermediary for.

In some embodiments, the appliance receiving the request may be local tothe client making the request. In other embodiments, the appliancereceiving the request may be connected to the client via a WAN. In stillanother embodiment, the appliance receiving the request may be connectedto the client via one or more intermediary devices. In this embodiment,the intermediary devices may comprise any of a WAN optimization device,a VPN device, and/or a transparent proxy device.

After intercepting the request, the appliance may identify that theobject is not located in a cache of the appliance in any manner (step1103). This identification may be done by any means, including withoutlimitation: performing a cache lookup based on an object name, afingerprinting method, and determining that a cached copy of the objecthas expired or is otherwise unusable. In some embodiments, this step maybe omitted. For example, this step may be omitted where the firstappliance does not maintain a cache.

The appliance may then forward the request to the server (step 1105).The first appliance may transmit the forwarded request to the server viaany protocol or protocols, including protocols other than the protocolsused to receive the first request. In some embodiments, the forwardedrequest may comprise the first request. In other embodiments, the firstappliance may modify, reformat, or otherwise alter the first request.For example, the first appliance may encrypt some or all of the firstrequest. In some embodiments, the appliance may transmit the request toa second appliance serving as a proxy for the server. In otherembodiments, the forwarded request may pass through any number ofintermediary devices before reaching the server 106.

After receiving the second request, the appliance may transmit, prior toreceiving a response to the forwarded request, a second request for theobject to a second device (step 1107). The second device may compriseany of a client 102, server 106, appliance 200, or client agent 120. Insome embodiments, the second device may comprise a browser cache. Insome embodiments, the appliance may determine the object may be storedin a second device by searching an index of objects previouslytransmitted. In another embodiment, the appliance may determine theobject may be stored in a second device by consulting a compressionhistory or compression history index. In some embodiments, the appliancemay determine whether the object has been transmitted to the seconddevice within a predetermined time period.

The second device may reside in any location relative to the appliance.In some embodiments, the second device may be on a LAN with theappliance. In one embodiment, the second device may comprise a secondappliance in a cluster with the appliance. In another embodiment, thesecond device may be connected to the appliance via a lower latencyconnection than the server is to the appliance.

In one embodiment, the appliance may transmit the second request priorto receiving any response to the request from the server. In anotherembodiment, the application may transmit the second request prior toreceiving an acknowledgement or other confirmation from the server thatthe request was received. In still another embodiment, the appliance maytransmit the second request prior to receiving any response to therequest from an intermediary device between the appliance and theserver.

The appliance may transmit any number of additional requests for theobject prior to receiving a response to the forwarded request. In oneembodiment the appliance may transmit a third request for the object toa third device. In one embodiment, the appliance may transmit a requestfor the object to each of a number of appliances in a cluster. Inanother embodiment, the appliance may send a request for the object to anumber of client agents 120 on a LAN with the appliance. For example, anappliance at a branch office, upon receiving a request for an object,may forward the request to a server at a central office and also send arequest for the object to any other appliances also at the branchoffice, in addition to one or more clients located on the branch office.

In some embodiments, the appliance may transmit a request for a portionof the object to a first device, and a request for a second portion ofthe object to a second device. In other embodiments, the appliance maydivide the requested object into any number of portions and send out oneor more requests for each portion.

The devices receiving the additional requests may service them in anymanner. In some embodiments, the devices may locate the object and begintransmitting the object to the appliance in any manner. In otherembodiments, the devices may ignore the requests. In other embodiments,the devices may determine that the object is not stored in a cache onthe device. In these embodiments, the devices may or may not transmit anindication to the first device that the object was not found. In stillother embodiments, the devices may forward the requests to one or moreadditional devices.

The appliance may then receive, from at least one of the server or thesecond device, the object (step 1109). The object may be received in anymanner, and via any connection or protocol. In some embodiments, theappliance may begin receiving the object from a plurality of sources. Inthese embodiments, the appliance may select a source to use forreceiving the object. In some embodiments, the appliance may select thesource that responded first. In other embodiments, the appliance mayselect the source having the highest available bandwidth. In still otherembodiments, the appliance may select the source based on proximity tothe appliance. In some embodiments, the appliance may cancel the requestor may reset or close the connections to other sources transmitting theobject.

In some embodiments, the appliance may receive a first portion of theobject from a first device, and a second portion of the object from asecond device. In these embodiments, the appliance may reassemble theportions of the object received from multiple sources into the object inany manner.

The appliance may then transmit the object to the client in any manner.In some embodiments, the appliance may forward the object received fromthe server 106. In other embodiments, the appliance may transmit theobject received from one or more other devices.

While the invention has been particularly shown and described withreference to specific preferred embodiments, it should be understood bythose skilled in the art that various changes in form and detail may bemade therein without departing from the spirit and scope of theinvention as defined by the appended claims.

1. A method for sharing compression histories among a plurality ofdevices to improve compression of data transmitted via a plurality ofconnections, the method comprising: (a) receiving, by a first devicefrom a second device, an index of entries for a compression historyshared between the second device and a third device, each index entrycomprising a location identifier of data stored in the second device;(b) receiving, by the first device, a data stream intended for a fourthdevice; (c) identifying, by the first device, that a portion of the datastream matches an entry of the received index; (d) transmitting, by thefirst device to the second device, a location identifier correspondingto the matched entry; (e) receiving, by the first device from the seconddevice, a portion of the compression history corresponding to thelocation identifier; (f) determining, by the first device, the portionof the compression history matches a portion of the data stream; and (g)transmitting, by the first device to the fourth device, informationidentifying the portion of the compression history.
 2. The method ofclaim 1, wherein at least one of the first device, second device, thirddevice, or fourth device comprises a transparent proxy.
 3. The method ofclaim 1, wherein the first device is connected via a local area networkto the second device.
 4. The method of claim 1, wherein step (a)comprises: determining, by the second device, that the first device isconnected via a local area network to the second device; andtransmitting, by the second device responsive to the determination, theindex of entries.
 5. The method of claim 1, wherein step (a) comprisesreceiving, by a first device from the second device, an index of entriesfor the compression history, each index entry comprising a compressionhistory chunk identifier.
 6. The method of claim 1, wherein step (a)comprises receiving, by a first device from the second device atpredetermined time intervals, an index for a plurality of compressionhistories.
 7. The method of claim 1, wherein step (c) comprisesidentifying, by the first device using a data fingerprinting technique,that a portion of the data stream matches an entry of the transmittedindex.
 8. The method of claim 1, wherein step (c) comprises identifying,by the first device using a data fingerprinting technique, that aportion exceeding a predetermined number of bytes of the data streammatches an entry of the transmitted index.
 9. The method of claim 1,wherein step (d) comprises transmitting, by the first device to thesecond device, a location identifier from the matched entry.
 10. Themethod of claim 1, wherein step (d) comprises transmitting, by the firstdevice to the second device, a request for a portion of the compressionhistory identified by the matched entry.
 11. The method of claim 1,wherein step (d) comprises transmitting, by the first device to thesecond device, a request for a portion of the compression historyidentified by the matched entry and at least one subsequent portion ofthe compression history.
 12. The method of claim 1, wherein step (g)comprises transmitting, by the first device to the fourth device, aportion of the data stream, the portion of the data stream compressedaccording to the portion of the compression history.
 13. The method ofclaim 1, wherein step (g) comprises transmitting, by the first device tothe fourth device, a portion of the second data stream, the second datastream compressed according to at least one portion of the compressionhistory and at least one portion of a second compression history, thesecond compression history shared between the first device and thefourth device.
 14. The method of claim 1, wherein step (g) comprisestransmitting, by the first device to the fourth device, informationidentifying a compression history chunk stored on the third device. 15.An appliance for enabling sharing of compression histories among aplurality of devices to improve compression of data transmitted via aplurality of connections, the appliance comprising: a compression enginewhich receives from a first device an index of entries for a compressionhistory shared between the first device and a second device; each indexentry comprising a location identifier of data stored in the firstdevice; identifies that a portion of a received data stream intended fora third device matches an entry of the received index; and determines aportion of the compression history matches a portion of the data stream;and a packet processor in communication with the compression enginewhich transmits to the first device a location identifier correspondingto the matched entry, receives from the first device the portion of thecompression history corresponding to the location identifier, andtransmits to the third device information identifying the portion of thecompression history.
 16. The system of claim 15, wherein at least one ofthe first device, second device, or third device comprises a transparentproxy.
 17. The system of claim 15, wherein the first device is connectedvia a local area network to the third device.
 18. The system of claim15, wherein the packet processor receives, from the first device, anindex of entries for the compression history, each index entrycomprising a compression history chunk identifier.
 19. The system ofclaim 15, wherein the packet processor receives, from the first deviceat predetermined time intervals, an index for the compression history.20. The system of claim 15, wherein the compression engine identifies,using a data fingerprinting technique, that a portion of the data streammatches an entry of the transmitted index.
 21. The system of claim 15,wherein the compression engine identifies, using a data fingerprintingtechnique, that a portion exceeding a predetermined number of bytes ofthe data stream matches an entry of the transmitted index.
 22. Thesystem of claim 15, wherein the packet processor transmits, to the firstdevice, a location identifier from the matched entry.
 23. The system ofclaim 15, wherein the packet processor transmits, to the first device, alocation of compression history chunk containing the matched entry. 24.The system of claim 15, wherein the packet processor transmits, to thefirst device, (i) a location identifier corresponding to the matchedentry, and (ii) an indication to begin transmitting the identifiedlocation of the compression history to the third device.
 25. The systemof claim 15, wherein the packet processor transmits, to the firstdevice, (i) a location identifier corresponding to the matched entry,and (ii) an indication to begin transmitting the identified location ofthe compression history and at least one subsequent location of thecompression history to the third device.
 26. The system of claim 15,wherein the packet processor transmits, to the fourth device, a portionof the second data stream, the portion of the second data streamcompressed according to the portion of the compression history.
 27. Thesystem of claim 15, wherein the packet processor transmits, to thefourth device, a portion of the second data stream, the second datastream compressed according to at least one portion of the compressionhistory and at least one portion of a second compression history, thesecond compression history shared between the first device and the thirddevice.
 28. The system of claim 15, wherein the packet processortransmits, to the fourth device, information identifying a compressionhistory chunk stored on the second device.
 29. The system of claim 15,wherein the packet processor transmits, to the fourth device,information identifying the portion of the compression history andidentifying at least one subsequent location in the compression history.30. A system for sharing compression histories among a plurality ofdevices to improve compression of data transmitted via a plurality ofconnections, the system comprising: means for receiving, by a thirddevice from a first device, an index of entries for a compressionhistory shared between the first device and a second device, each indexentry comprising a location identifier of data stored in the firstdevice; means for receiving, by the third device, a data stream intendedfor a fourth device; means for identifying, by the third device, that aportion of the data stream matches an entry of the received index; meansfor transmitting, by the third device to the first device, a locationidentifier corresponding to the matched entry; means for receiving, bythe third device from the first device, a portion of the compressionhistory corresponding to the location identifier; means for determining,by the third device, the portion of the compression history matches aportion of the data stream; and means for transmitting, by the thirddevice to the fourth device, information identifying the portion of thecompression history.